473,396 Members | 2,158 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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

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 <atag. 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?
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/
Jul 13 '08 #1
2 1250
If you just place the ascx file into the web site directory, you should be
able to use the control from the file in other pages in the same way as you
would do in the web app project. Did you try this?

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Nathan Sokalski" <nj********@hotmail.comwrote in message
news:ey**************@TK2MSFTNGP03.phx.gbl...
>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 <atag. 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?
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

Jul 13 '08 #2
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
Jul 13 '08 #3

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

Similar topics

2
by: Emma | last post by:
Hi, I'm developing a GUI with almost all Usercontrols. It's been working wonderfull up till a few weeks ago, and really crashed yesterday. Suddenly I can no longer add some of my usercontrols...
3
by: darrel | last post by:
Is it practical? I have a site we've been working on where a lot of the objects on the page are usercontrols...the header, the footer, navigation, etc. I need to make a stand-alone mini-site...
4
by: Anders K. Jacobsen [DK] | last post by:
Hi I have some common UserControls i want to share between to sites (on the same mashine but on diffrent virtual paths). right now i have on solution file with aprox 10 projects. 2 of these is...
10
by: eswanson | last post by:
I have broken up my web site into smaller web site projects. When I look at the precompiled files, it always has the virtual directory in them ie: <preserve resultType="3"...
2
by: Nathan Sokalski | last post by:
Because I wanted the builds for my ASP.NET sites to be a single *.dll in a /bin/ directory (like VSNET 2003), I decided to try the Web Application Project download. However, I am still pulling my...
9
by: Nathan Sokalski | last post by:
I am using ASP.NET 2.0's ImageMap Control to create 2 imagemaps, one directly below the other. When I do this a thin blank space appears between them. After several days of frustration I realized...
0
by: Screaming Eagles 101 | last post by:
Hi, since a while I have a problem with a solution containing 2 projects , let's say a project Main with the interface and a project controls with 4 usercontrols, which I use on the 'Main' form. ...
2
by: trullock | last post by:
Hi, Here's my problem, hopefully someone can suggest a suitable solution :) I've got a large web application project, in which i want to create a sort of plugin architecture. I'm going to...
3
by: Oriane | last post by:
Hi there, I would like to open my Asp.Net project as a "Web Application" rather than as a "Web Site" in Visual Studio. But the thing is that I use the System.Web.Profile and the auto-generated...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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,...

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.