Problem setting focus dynamically
-
Hi,whenever I am using update panel,i can not dynamically set focus to the control I want to.Should I use any Java Script?Can anybody help me out???Thanx in advance...
-
Hi,whenever I am using update panel,i can not dynamically set focus to the control I want to.Should I use any Java Script?Can anybody help me out???Thanx in advance...
-
Hi,whenever I am using update panel,i can not dynamically set focus to the control I want to.Should I use any Java Script?Can anybody help me out???Thanx in advance...
yes dear u can use javascript when u use UpdatePanel in update panel some time document.getelementById("") is working properly. U can use the javascript with ClientControl Id. Simple add attibute in your codebehind file and passes ClientId control to the javascript like below; .cs Button1.Attribute.Add("onclick","javascript : return JSscript("+TextBox1.ClientID+");"); on javascripting function JSscript(ctrlID) { ctrlID.focus(); return false; } I hope it will work for u ...