Getting focus on the Next Controls

Posted by Shoyebaziz123 under ASP.NET on 10/2/2009 | Views : 1912 | Status : [Member] | Replies : 2
Hello Friends,
In my application i have an update panel, in which i have a Gridview control
i have add template field(TextBoxes) in Gridview naming them txtName,txtAddress,txtamount.... and setting property autopost back =true

Now problem is that when i enterd some text in textbox then the next control
must have the focus......How i can do this thing...
Please give me the code for that in vb.net..

Thanks in advance




Responses

Posted by: Srikrishna777 on: 10/3/2009 [Member] Starter

Up
0
Down
In the first textbox's Leave event set the focus of the second text box.

Sample code:

textbox1_leave
{
---------
---------
textbox2.focus();
}

You can try this.

Thanks,
M.Srikrishna

Shoyebaziz123, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Virendradugar on: 10/6/2009 [Member] [MVP] Silver

Up
0
Down
Hi,

As said, you have the set the AutoPostBack property to true, in the server side event of the textbox, you can set focus to the next control.


Thanks,
Virendra Dugar.

Shoyebaziz123, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response