asp.net - Maintain Scrollbar Postition in TabPanel of Ajax TabContainer after Postback -


how maintain position of scrollbar in tabpanel of ajax tabcontainer after partial postback? far tried following script wont retrieve position.

 <script type="text/javascript">     var xpos, ypos;     var prm = sys.webforms.pagerequestmanager.getinstance();     prm.add_beginrequest(beginrequesthandler);     prm.add_endrequest(endrequesthandler);     function beginrequesthandler(sender, args) {         xpos = $get('<%=inputtabpanel.clientid%>').scrollleft;         ypos = $get('<%=inputtabpanel.clientid%>').scrolltop;     }     function endrequesthandler(sender, args) {         $get('<%=inputtabpanel.clientid%>').scrollleft = xpos;         $get('<%=inputtabpanel.clientid%>').scrolltop = ypos;     } </script> 

you can include maintainscrollpositiononpostback on <%@ page%> directive, this:

<%@ page language="c#" maintainscrollpositiononpostback="true" %> 

with this, javascript automatic generated asp.net. but, if control wrapped updatepanel, there no reason complete postback , consequent lose of position.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -