You can also set the template attribute of the control in asp.net. In the asp.net application of theme, we can easily change the layout, style, or appearance of the template control.
For example, for the login control, the. aspx page only needs to be defined as follows:
Copy to ClipboardReference: [www.bkjia.com] <asp: Login ID = "login1" runat = "server"> </asp: Login>
In the. skin file, we can set the layout of the login control. Of course, you can define any number of different la S and specify different skinids.
For example:
Copy to ClipboardReference: [www.bkjia.com] <asp: login runat = "server">
<LayoutTemplate>
<I> Please Enter your credentials: </I> <br/>
<Table>
<Tr>
<Td align = "right"> <asp: Label ID = "lblName" runat = "server" Text = "User Name:"> </asp: Label> </td>
<Td> <asp: TextBox ID = "Username" runat = "server"> </asp: TextBox> </td>
</Tr>
<Tr>
<Td align = "right"> <asp: Label ID = "lblPsw" runat = "server" Text = "Password:"> </asp: Label> </td>
<Td> <asp: TextBox ID = "Password" runat = "server" Textmode = "password"> </asp: TextBox> </td>
</Tr>
<Tr>
<Td colspan = "2" align = "center"> <asp: button ID = "btnLogin" runat = "server" Text = "Log In" CommandName = "Login"/> </td>
</Tr>
</Table>
<Asp: Literal ID = "FailureText" runat = "server" EnableViewState = "false"> </asp: Literal>
</LayoutTemplate>
</Asp: login>
This definition in. skin replaces the template content of the login control on the page.