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 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
* "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/>
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/> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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?
|
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.
|
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...
|
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
|
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...
| |
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.
|
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.
|
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
|
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..
|
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...
|
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,...
| |
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...
|
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,...
|
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...
|
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...
|
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...
|
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();...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |