i want to use doPostBack function in my link.When user clicks it,it wont redirect to another page and page will be postback.I am using this code but it doesnt function.Where do i miss?
< a id='Sample' href='javascript:__doPostBack('__PAGE','');'> function __doPostBack(eventTarget, eventArgument) { var theform = document.ctrl2 theform.__EVENTTARGET.value = eventTarget theform.__EVENTARGUMENT.value = eventArgument theform.submit() }
Try this :