//JavaScript functions for maintaining the scroll position of the div after partial page post back
var xPos,yPos;
var prm=Sys.WebForms.PageRequestManager.getInstance();
function BeginRequestHandler(sender,args)
{
if(document.getElementById('<%=scrll.ClientID%>')!=null) //Scrll is the id of the div tag to which we apply this javascript
{
xPos=document.getElementById('<%=scrll.ClientID%>').scrollLeft;
yPos=document.getElementById('<%=scrll.ClientID%>').scrollTop;
}
}
function EndRequestHandler(sender,args)
{
if(document.getElementById('<%=scrll.ClientID%>')!=null)
{
document.getElementById('<%=scrll.ClientID%>').scrollLeft=xPos;
document.getElementById('<%=scrll.ClientID%>').scrollTop=yPos;
}
}
prm.add_beginRequest(BeginRequestHandler);
prm.add_endRequest(EndRequestHandler);