Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ascx vs dll error

Status
Not open for further replies.

slatetm

Programmer
Mar 20, 2007
16
0
0
US
This might be too general of a question but I'm hoping someone will know. I created a user control. When I have the user control in my project as a .ascx page everything works fine. When I have the control in my project as a DLL it does not work. The first time it tries to reference one of the controls on the page, in this case a list box, I get a "object not set.." error. I realize that it is due to it not being initialized before this line but what exactly is the difference between the page loading as a ascx and as a dll? I've posted this to the c# forum too but feel it is more appropriate for this one.

 
User controls aren't meant to be packaged and shared. Their meant for use only in the application they're created for.

If you want deployable controls, a server control is a more appropriate, though more difficult to implement choice.

MCP, MCTS - .NET Framework 2.0 Web Applications
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top