i want to disabel a label when clicking the textbox..i used the below code ..after clicking submit button the error message will be appeared but i want to disable label whenever the textbox is clicked
in asp page
<asp:TextBox ID="txtname" runat="server" type="text" ></asp:TextBox>
<asp:Label ID="lblname" style="color:red" runat="server" Text=""></asp:Label>
<asp:Button ID="Button1" type="button" runat="server" Text="Submit" />
in js page
if (txtname.value == "") {
document.getElementById('lblname').innerHTML = '*Enter Name';
}