473,666 Members | 2,367 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

2nd Prob - Error Design Time Html

We have a web control. (Please note, all our libraries and controls are given a
strong name). When we place the web control on a web page, it works fine. We
are using a project reference to it in our sample application. Sometimes
immediately following a build/rebuild, it displays the design time error html.
We have tracked the problem down to the first line in GetErrorDesignT imeHtml() (I
believe that's the method's name, I just woke up). That line is Dim ourObj As
OurObject = DirectCast(comp onent, OurObject).

The exception message given is along the lines of "invalid type cast". Now, how
is "Dim a As b = DirectCast(c, b)" when c is passed into the routine as follows?:
Public Sub GetSomething(By Val c As b) Just doesn't make sense to me.

Note: I have found that when I do a build, the exe can't be overridden (it shows
up in the task list when I build but is removed just as fast). I have to build
over and over in order to make out which file can't be over-written. The
permissions are not an issue. I believe vstudio is over-writing a file that it
has locked between builds but can't be sure....

Any help is appreciated,

Thanks,

Mythran
Nov 20 '05 #1
3 1109
> The exception message given is along the lines of "invalid type cast".
Now, how
is "Dim a As b = DirectCast(c, b)" when c is passed into the routine as follows?: Public Sub GetSomething(By Val c As b) Just doesn't make sense to me.
Why do you need to cast c at all as you already did this casting in the
function signature, you probably are not passing the right type to the
function at run time.

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing

"Mythran" <ki********@hot mail.com> wrote in message
news:eu******** *****@TK2MSFTNG P10.phx.gbl... We have a web control. (Please note, all our libraries and controls are given a strong name). When we place the web control on a web page, it works fine. We are using a project reference to it in our sample application. Sometimes
immediately following a build/rebuild, it displays the design time error html. We have tracked the problem down to the first line in GetErrorDesignT imeHtml() (I believe that's the method's name, I just woke up). That line is Dim ourObj As OurObject = DirectCast(comp onent, OurObject).

The exception message given is along the lines of "invalid type cast". Now, how is "Dim a As b = DirectCast(c, b)" when c is passed into the routine as follows?: Public Sub GetSomething(By Val c As b) Just doesn't make sense to me.

Note: I have found that when I do a build, the exe can't be overridden (it shows up in the task list when I build but is removed just as fast). I have to build over and over in order to make out which file can't be over-written. The
permissions are not an issue. I believe vstudio is over-writing a file that it has locked between builds but can't be sure....

Any help is appreciated,

Thanks,

Mythran

Nov 20 '05 #2
* "Mythran" <ki********@hot mail.com> scripsit:
believe that's the method's name, I just woke up). That line is Dim ourObj As
OurObject = DirectCast(comp onent, OurObject).

The exception message given is along the lines of "invalid type cast". Now, how
is "Dim a As b = DirectCast(c, b)" when c is passed into the routine as follows?:
Public Sub GetSomething(By Val c As b) Just doesn't make sense to me.


I don't see any reason for using 'DirectCast' in this situation. What
about removing the 'DirectCast'?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #3
lol sorry...

The original function is the overridden function GetDesignTimeHt ml(ByVal
component As Object).

I am not passing component, the framework is ;)

After more testing I found that component (the object) is the previous
version of the component loaded (using the designer). I checked the
references but they are all project references...so that doesn't help me
much (solving the prob). So, any more suggestions?

Thanks,

Mythran
"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:2k******** ***@uni-berlin.de...
* "Mythran" <ki********@hot mail.com> scripsit:
believe that's the method's name, I just woke up). That line is Dim ourObj As OurObject = DirectCast(comp onent, OurObject).

The exception message given is along the lines of "invalid type cast". Now, how is "Dim a As b = DirectCast(c, b)" when c is passed into the routine as follows?: Public Sub GetSomething(By Val c As b) Just doesn't make sense to me.


I don't see any reason for using 'DirectCast' in this situation. What
about removing the 'DirectCast'?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
1795
by: Robot Tree | last post by:
Anyone know how to do this? I have 25 *.gif files, all of the same dimensions. I want to display one at a time in the top middle of a dynamic web page, with 25 links below the display that will, when clicked, each display the corresponding file (I want to make just one web page to display the paintings rather than 25 separate pages). If anything, could I just have a link to a page that does this so I can figure it out myself?
6
1635
by: oeyvind toft | last post by:
I have a frameset consisting of 3 frames: top, left and right. In top frame: body onload calls a js init function to set (or resets) values in textareas etc...in all frames. In right frame: A large textarea for dynamicly updated text. Problem: When clicking the browser 'update' this doesnt work: myTextAreaOnTheRight = ""; UNLESS I put an alert(anything) before the statement.
8
1774
by: Jacob Crossley | last post by:
Preface: Not to sound mean or arrogant, but please don't answer this question unless you have a specific and tested answer. I'm saying this only because I posted the same quesion earlier and got spammed by this so-called Microsoft MVP that gave me a very vague answer, followed by a series of incorrect answers that I had already mentioned were tried, tested and failed. Sorry I had to start my post like that : - ) but here goes my actual...
1
1251
by: Luis Ferrao | last post by:
Happy new year everyone. I'm building a templated website. For each individual content page I have a UserControl that holds the content. The UserControl inherits from a custom PlaceHolder class. Everything works great, well, everything but one small thing really. When I try to use the Visual Studio 'design view' to open and edit my
17
2694
by: tshad | last post by:
Many (if not most) have said that code-behind is best if working in teams - which does seem logical. How do you deal with the flow of the work? I have someone who is good at designing, but know nothing about ASP. He can build the design of the pages in HTML with tables, labels, textboxes etc. But then I would need to change them to ASP.net objects and write the code to make the page work (normally I do this as I go - can't do this...
8
2108
by: Ravi Ambros Wallau | last post by:
Hey guys: What can I do when an "Error Creating Control" is displayed on the form (instead of the control), and a tooltip indicating the error never is displayed? Is there some log, some hidden message, some entry in registry where a log is created (or that enables a log, trace, dump or whatever)... I'm a little bit frustated with this error :-( Tks, Ravi.
0
1598
by: pabloazorin | last post by:
I developed a Date Picker web control using C# and .net framework 1.1 I added my control to Visual Studio 2003 IDE toolbar. When I drag and drop my control to design web page, the control renders correctly. If I change to HTML the generated html is <cc1:IT24DateTime id="IT24DateTime1" runat="server" Type="Date"></cc1:IT24DateTime> .... and that works correctly.
0
1247
by: Greg Corradini | last post by:
Hello all, I'm having trouble inserting an SQL selection into a new MS Access table. I get a parameter error on my insert statement when I try this (see below for code and error msg). I'm not sure if 'insert' or 'update' is the route I should be taking. CODE: #Import Pythond Standard Library Modules import win32com.client, sys, os, string, copy, glob import mx.ODBC.Windows as odbc
1
1305
by: sharat | last post by:
hello groups. i am using fc4, gcc compiler. I am usngi vectors in my program and i m facing memory corruption problem it is giving error as " ** glibc detected *** double free or corruption " . while debugging using gdb it is showing that vector destroyed .. i m not getting where is the prob..
0
8440
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8352
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8780
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8549
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8636
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7378
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6189
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5661
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4358
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.