Using UserControls in a Web Site rather than a Web Application Project


N

Nathan Sokalski

I have been told that prior to SP1 you were forced to use the Create Web
Site. link rather than the Web Application Project when using ASP.NET.
Although I now know this, I have an existing site I need to help someone
with and would like to know how to add a UserControl (an ascx file) in a web
site created using the Create Web Site. link. If I drag the *.ascx file onto
the page, it simply creates a link to it using the <a> tag. I have been
unable to figure out how to add something to the system.web -> pages ->
controls section of Web.config, since Create Web Site. does not build DLLs
the same way Web Application Project does. Can someone help me here?
 
Ad

Advertisements

Ad

Advertisements

J

joteke

Dragging in source view might do this, but if you do it in design
view, it should do @register directives correctly. But as was said,
there should be no difference in it web site vs project what comes to
registering them on the page.

Teemu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top