Label controls are used to label the two TextBox controls

Saranya Boopathi
Posted by Saranya Boopathi under ASP.NET category on | Points: 40 | Views : 652
Label controls are used to label the two TextBox controls:
<%@ Page Language="C#" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Label Form</title>
</head>
<body>
<form id="form1" runat="server">
<div>

<asp:Label
id="lblFirstName"
Text="First Name:"
AssociatedControlID="txtFirstName"
Runat="server" />
<br />
<asp:TextBox
id="txtFirstName"
Runat="server" />
<br /><br />
<asp:Label
id="lblLastName"
Text="Last Name:"
AssociatedControlID="txtLastName"
Runat="server" />
<br />
<asp:TextBox
id="txtLastName"
Runat="server" />
</div>
</form>
</body>
</html>

Comments or Responses

Login to post response