User Control:
As the name suggest user control are made by developer based on there requirement which are not available. In single word you can say user control is customized control based on user requirement.
Many time webpage contains similar controls eg. Address it may be billing address or shipping address, or there are many other case of using similar controls. You can create a user control containing the name, address, city, state, and zip code and drop it onto a Web page where needed . It will save time and provide consistency in form of appearance.
There are two way for making User control
1. Using web userControl.ascx
2. Converting A standard Asp.net web page into User control page.
You can create a user control in Visual Studio 2005 by choosing Website, Add New Item, Web User Control
<%@ Control Language="C#" AutoEventWireup="true"
CodeFile="MyControl.ascx.cs" Inherits="MyControl" %>
It has .ascx extension making sure that it cannot executed standalone. I mean you have to use .aspx page to use the user control. All other control will same as on .aspx page.
Converting .aspx page to uaser control
Remove the , , and
See
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment