Implementing a User Control on an ASP.NET Page (VB.net)
<%@ Page Language=VB Debug=true %> <%@ Register TagPrefix="My" TagName="SimpleControl" Src="UserControlControls.ascx" %> <HTML> <HEAD> <TITLE>Implementing a User Control on an ASP.NET Page</TITLE> </HEAD> <BODY LEFTMARGIN="40"> <form runat="server" id="MyForm" > <BR><BR> <My:SimpleControl id="MSC1" runat="server" /> </form> </BODY> </HTML> <%--UserControlControls.ascx <Table style="font: 10pt verdana;border-width:1; border-style:solid;border-color:black;" cellspacing="15"> <TR> <TD> <asp:Label id="lbl1" runat="server" Font-Bold="True" Text="User Name: " /> </TD> <TD> <asp:TextBox id="txtUserName" runat=server /> </TD> </TR> <TR> <TD> <asp:Label id="lbl2" runat="server" Font-Bold="True" Text="Password: " /> </TD> <TD> <asp:TextBox id="txtPassword" runat=server TextMode="Password" /> </TD> </TR> </Table> --%>
1. | User control with no user interface (VB.net) | ||
2. | User control with asp control | ||
3. | LoadControl user control |