How to give focus to Textbox?

 Posted by vishalneeraj-24503 on 5/5/2014 | Category: ASP.NET Interview questions | Views: 375 | Points: 40
Answer:

We have a Focus static method of TextBox control,through which we can set focus to TextBox at run-time.

For Example:-
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>


On Code behind on page load event:-
TextBox1.Focus();


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response