|
-
Apr 16th, 2005, 05:50 AM
#1
Thread Starter
Member
how to set focus to text box?
i am learning .net. In asp.net i run a web form that has a username and password field. If i press submit button without entering the username the focus must go back to the username textbox and show a message that i have not entered a username.
pl help me,
sai abhiram bandhakavi.
-
Apr 16th, 2005, 06:27 AM
#2
Re: how to set focus to text box?
Use client side validation (javascript). Check for the value entered in the textbox, if it's "", then use the .focus() method on it, and return false to the submit button.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|