thanks, but even using ajax it still creates a postback doesnt it. on focus of the control i need it to run some vb.net code ( server side code ). I have ajax set up and it still loads the page_load event so i presume it is still posting back, no ? eiher way i dont have it working with ajax, maybe i have set some thing wrong my code is in pageload event TextBox1Test.Attributes.Add("onfocus", "javascript:DoPostBack('TextBox1Test');") Dim eventTarget As String = Request.Form("__EVENTTARGET") If eventTarget IsNot Nothing Then DayPostback(eventTarget) // server side code i need to run on focus End If javascript code function DoPostBack(control) { __doPostBack(control, "onFocus"); } if i set the DayPostback method to manually set the focus, i get in a loop, if I loop the textbox loses focus after the event has been fired
modified on Monday, August 1, 2011 7:36 PM