C# textbox focus with AJAX

Narenselva
Posted by Narenselva under C# category on | Points: 40 | Views : 1916
Hi Friends,

If i want to use focus() with ajax it wont work with the code textbox1.focus(). but will work perfectly with out ajax. To resolve that , refer the below code

TO USE focu WITH AJAX

ScriptManager.GetCurrent(Page).SetFocus(textboxid);

ScriptManager.GetCurrent(this.Page).SetFocus(this.textboxid);

REFER :
http://www.linkedin.com/groupAnswers?viewQuestionAndAnswers=&discussionID=160309243&gid=85746&commentID=94160673&goback=%2Enmp_*1_*1_*1_*1_*1_*1_*1_*1_*1&trk=NUS_DISC_Q-subject#commentID_94160673

http://stackoverflow.com/questions/1307224/setfocus-to-asptextbox-within-asppanel-within-aspcontent-from-content-page-lo

it's working great.

Comments are welcome.
Thanks in advance.
Narendran .N
http://4naren.blogspot.in/

Comments or Responses

Posted by: T.Saravanan on: 9/10/2012 Level:Silver | Status: [Member] [MVP] | Points: 10
Hi,

Nice info but try to avoid to provide reference links in code section.

Login to post response