Dear Developer..now you can register User Controls Globally (ASP.NET 2.0)

In ASP.Net 1.x, if you wanted to use any user control, you need to add a page directive (for .ascx) in that .aspx page. Let's say, if you wanted to use in most of the pages, then it's going to be hard as you need to add the directive in most of the pages!


But in ASP.Net 2.0, you can define this at the web.config level. Once you define in web.config, you can use it in entire project.

 

Example syntax in web.config would be as showin below:
<pages>
      
<controls>
            
<add tagPrefix="MenuUCTL" tagName="MenuControl" src="~/MenuControl.ascx" />
      
</controls >
</pages >
</system.web>


Another good thing is, once you add in web.config, you are going to start seeing intelliSense for that control in VS.NET and it’ going to make your life easy in using that control :)

Here is an example picture showing intelliSense for control in VS.NET!



user control intellisense image in vs.net asp.net2.0

 

J Hoping this new feature exites you  J

Published Sunday, September 26, 2004 6:04 PM by SreedharK

Comments

# Register User Controls Globally in ASP.NET 2.0

Sunday, September 26, 2004 10:02 PM by TrackBack

# re: Dear Developer..now you can register User Controls Globally (ASP.NET 2.0)

Monday, September 27, 2004 3:25 AM by Chad Thiele
Man, that is nice... wish it was out now! (I say that on all my posts, lol!)

# re: Dear Developer..now you can register User Controls Globally (ASP.NET 2.0)

Wednesday, July 07, 2010 7:12 AM by Stranger

Great article as for me. I'd like to read more concerning that topic. The only thing that blog misses is a few pics of some devices.

Alex Trider

<a href="www.jammer-store.com/">cell jammers</a>

# re: Dear Developer..now you can register User Controls Globally (ASP.NET 2.0)

Saturday, July 17, 2010 2:03 PM by indian escort heatrow

It was extremely interesting for me to read the blog. Thank author for it. I like such topics and everything that is connected to them. I definitely want to read more on this site soon.

David Flouee

# re: Dear Developer..now you can register User Controls Globally (ASP.NET 2.0)

Thursday, July 22, 2010 7:33 AM by escort high class

Really interesting blog to read it as for me. By the way, why don't you send that article to social bookmarks? It will bring lots of traffic to this article.

# re: Dear Developer..now you can register User Controls Globally (ASP.NET 2.0)

Sunday, July 25, 2010 5:08 PM by London escort spanish

I definitely want to read a bit more on this site soon. By the way, rather nice design you have here, but what  do you think about changing it from time to time?

Summer Strangfield

# re: Dear Developer..now you can register User Controls Globally (ASP.NET 2.0)

Wednesday, July 28, 2010 12:52 AM by brunettegirls

It was certainly interesting for me to read that blog. Thanks for it. I like such topics and anything connected to this matter. I definitely want to read a bit more soon.

Julia Hakkinen

# re: Dear Developer..now you can register User Controls Globally (ASP.NET 2.0)

Wednesday, September 01, 2010 4:07 AM by club escort geneve

Don't stop posting such themes. I like to read blogs like this. BTW add some pics :)

# re: Dear Developer..now you can register User Controls Globally (ASP.NET 2.0)

Saturday, October 02, 2010 1:01 AM by Julia Swenson

Rather interesting place you've got here. Thanks the author for it. I like such topics and everything connected to this matter. I definitely want to read a bit more on that blog soon.

Julia Swenson

<a href="irelandescortdirectory.com/.../carlow-escorts">escort carlow</a>

# re: Dear Developer..now you can register User Controls Globally (ASP.NET 2.0)

Tuesday, November 08, 2011 6:13 PM by Rose23Wilson

Good post as for me. Keep writing such stuff!

Rose 23Wilson

<a href="delhiescortservice.com/">escort service in new delhi</a>

Leave a Comment

(required) 
(required) 
(optional)
(required)