Understanding ASP.NET User Control | Learnxpress

Understanding ASP.NET User Control

February 9th, 2009 Anand Narayanaswamy 0 Comments

With ASP.NET, you can develop websites with uniform look and feel with the help of User Controls.

Moreover, you only need to update a single page and the related changes are reflected across all the web page.

Let us now examine how to write code for it

Add the following line of code on the top of the ASP.NET page

<%@ Page Language="C#" Debug="true"%>

<%@ register TagPrefix = "TOP" TagName = "LINKS" 

src = "top_links.ascx" %>

 

Next, place the following code where you want to display the content from top_links.ascx

<TOP:LINKS id = "top" runat = "server"/>

You should note that the content will not be visible during design time. You can be able to view the content when you execute the ASP.NET page.

As I mentioned above, if you add the above set of tags on all pages then you only need to update top_links.ascx each time.

The above method will surely help you in future when you update/maintain your web site as it will reduce your costly time in a perfect manner.

 

If You Like This Post, Share it With Your Friends & Peers

Digg
stumbleupon
Delicious
facebook
twitter
reddit
rss feed bookmar
   

No Comment to “Understanding ASP.NET User Control”

  1. No Comment yet. Be the first to comment...

Leave your comment here:

Terms

  • f
  • aspnet user windows7
  • user control asp net
  • aspnet user vs2010 express
  • understanding users control in asp net
  • aspnet user windows 7

  • windows 7 aspnet user
  • aspnet user on windows 7
  • asp net user windows 7
  • usercontrol trong asp net
  • how to add aspnet user in windows 7
  • windows 7 asp net user
  • windows7 aspnet user
  • understanding net user control
  • no aspnet user windows 7
  • no aspnet user in windows7
  • aspnet user windows 7 missing
  • aspnet user in windows 7
  • utilisateur aspnet windows7
  • ASPNET <%@ Register TagPrefix=
  • seo forum


Google Analytics Alternative