Code Screen Shot below :
Actual Code below :
<script type="text/javascript">
var xPos,yPos;
var prm = Sys.WebForms.PageRequestManager.getInstance();
function BeginRequestHandler(sender,args){
if($get('<%= Panel1.ClientID %>') != null){
xPos = $get('<%= Panel1.ClientID %>').scrollLeft;
yPos = $get('<%= Panel1.ClientID %>').scrollTop;
}
}
function EndRequestHandler(sender,args){
if($get('<%= Panel1.ClientID %>') != null){
$get('<%= Panel1.ClientID %>').scrollLeft = xPos;
$get('<%= Panel1.ClientID %>').scrollTop = yPos;
}
}
prm.add_beginRequest(BeginRequestHandler);
prm.add_endRequest(EndRequestHandler);
</script>
<form runat="server">
<asp:ScriptManager id="ScriptManager1" runat="server" ScriptMode="Release" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Panel ID="Panel1" runat="server" >
<pre>
<asp:Literal ID="litXML" runat="server" />
</pre>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
</form>
No comments:
Post a Comment