M
mdemase
Hello -
I've been racking my brains trying to figure out what's going on with
my embedded .NET 2.0 windows user control.
I've developed a Windows Forms application using Visual C# 2005
Express. I'm interested in migrating it to the web as an embedded
windows user control.
As a proof of concept, I've been playing around embedding some very
basic Windows user controls into both HTML and ASP pages using Visual
Web Developer 2005 Express. (My web development is very limited).
I've done some searching and found examples of how to embed a user
control as an object by inserting something like the following
(<OBJECT id="myObject" classid="myDll.dll#myNamespace.myControl"
height=480 width=480></OBJECT>) into HTML code and copying the DLL
file in the 'root' (not /bin) directory of the page.
Now here's where the fun comes in...
I'm testing some very basic embedded controls using Microsoft's
ASP.NET Development server and I'm getting some very odd and
unexplained behavior.
1) When I create a new website project and insert the control, most of
the time (but not always) my sample control will display in the
internal browser inside the Visual Web Developer IDE and it will
display in IE (as launched from the Visual Web Developer IDE in debug
mode)
2) If I change the embedded user control code (inside Visual C#
Express) and recompile and re-copy the DLL file into the web project
directory, I very rarely see the updates reflected in the user
control. It seems to be using a cached version of the DLL??
3) Eventually, I will reach a state where the user control no longer
even appears in the web browser window when trying to run the site
(using the Development Server). It only shows up as an object icon
place holder.
I've tried all sorts of things like:
1) Stopping the development server before copying the new DLL file
into the web project
2) Restarting Visual Web Developer Express
3) Deleting all the temporary IE files
4) Deleting all the files from C:\WINDOWS\Microsoft.NET\Framework
\v2.0.50727\Temporary ASP.NET Files\
None of those attempts seems to change what I'm observing - why only
sometimes the embedded control displays and why none of the re-
compiles/re-copying of the DLL files seem to 'take effect'. Also,
once the control stops displaying, I essentially have to create an
entirely new web project to see the control again.
Any thoughts/links to examples or suggestions would be greatly
appreciated.
Thanks,
Mike D.
I've been racking my brains trying to figure out what's going on with
my embedded .NET 2.0 windows user control.
I've developed a Windows Forms application using Visual C# 2005
Express. I'm interested in migrating it to the web as an embedded
windows user control.
As a proof of concept, I've been playing around embedding some very
basic Windows user controls into both HTML and ASP pages using Visual
Web Developer 2005 Express. (My web development is very limited).
I've done some searching and found examples of how to embed a user
control as an object by inserting something like the following
(<OBJECT id="myObject" classid="myDll.dll#myNamespace.myControl"
height=480 width=480></OBJECT>) into HTML code and copying the DLL
file in the 'root' (not /bin) directory of the page.
Now here's where the fun comes in...
I'm testing some very basic embedded controls using Microsoft's
ASP.NET Development server and I'm getting some very odd and
unexplained behavior.
1) When I create a new website project and insert the control, most of
the time (but not always) my sample control will display in the
internal browser inside the Visual Web Developer IDE and it will
display in IE (as launched from the Visual Web Developer IDE in debug
mode)
2) If I change the embedded user control code (inside Visual C#
Express) and recompile and re-copy the DLL file into the web project
directory, I very rarely see the updates reflected in the user
control. It seems to be using a cached version of the DLL??
3) Eventually, I will reach a state where the user control no longer
even appears in the web browser window when trying to run the site
(using the Development Server). It only shows up as an object icon
place holder.
I've tried all sorts of things like:
1) Stopping the development server before copying the new DLL file
into the web project
2) Restarting Visual Web Developer Express
3) Deleting all the temporary IE files
4) Deleting all the files from C:\WINDOWS\Microsoft.NET\Framework
\v2.0.50727\Temporary ASP.NET Files\
None of those attempts seems to change what I'm observing - why only
sometimes the embedded control displays and why none of the re-
compiles/re-copying of the DLL files seem to 'take effect'. Also,
once the control stops displaying, I essentially have to create an
entirely new web project to see the control again.
Any thoughts/links to examples or suggestions would be greatly
appreciated.
Thanks,
Mike D.