Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="ScrollWAjax.aspx.cs" Inherits="_Default" MaintainScrollPositionOnPostback="true" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <link href="App_Themes/GridStyleSheet.css" rel="stylesheet" type="text/css" />
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head runat="server">
- <title>Untitled Page</title>
- </head>
- <body>
- <form id="form1" runat="server">
- <asp:ScriptManager ID="scriptManager" runat="server" EnablePartialRendering="True" />
- <script type="text/javascript" language="javascript">
- var prm = Sys.WebForms.PageRequestManager.getInstance();
- prm.add_pageLoaded(pageLoaded);
- function pageLoaded(sender, args) {
- Func()
- }
- function Func() {//document.getElementById("hdnScrollTop").value
- document.getElementById("divScroll").scrollTop = document.getElementById("hdnScrollTop").value;
- }
- function Func2() {
- var s = document.getElementById("divScroll").scrollTop;
- document.getElementById('hdnScrollTop').value = s;
- }
- </script>
- <input type="hidden" id="hdnScrollTop" runat="server" value="0"/>
- <div>
- <asp:UpdatePanel UpdateMode="Conditional" ID="UpdatePanel1" runat="server" >
- <ContentTemplate>
- <div runat="server" id="divScroll" style="width:559px; height:365px; overflow: scroll;" onscroll="Func2()">
- <asp:gridview id="GridView" runat="server" width="100%" cellpadding="3" GridLines="None" AutoGenerateColumns="True" BackColor="Black" BorderColor="#666666" ShowHeader="False" ForeColor="White" BorderStyle="Solid" BorderWidth="2px" Height="344px"></asp:gridview>
- </div>
- <asp:Timer ID="Timer1" runat="server" Interval="5000" Enabled="True" OnTick="Timer1_Tick"></asp:Timer>
- <asp:Button ID="Button4" runat="server" OnClick="Button4_Click" Text="Chat" />
- <asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="Debug" />
- <asp:Button ID="Button3" runat="server" OnClick="Button3_Click" Text="ALL" />
- </ContentTemplate>
- </asp:UpdatePanel>
- </div>
- <script type="text/jscript" >
- Func()
- </script>
- <%--<iframe height="500" width="500" src="http://longlostbro.com/shellinabox-2.14/shellinabox/shell_in_a_box.js" > </iframe>--%>
- <div>
- <asp:UpdatePanel UpdateMode="Conditional" ID="UpdatePanel2" runat="server" >
- <ContentTemplate>
- <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Send CMD" />
- <asp:TextBox ID="TextBox1" runat="server" ></asp:TextBox>
- <asp:Button ID="Button5" runat="server" OnClick="Button5_Click" Text="Find Players Online" />
- <br />
- <asp:ListBox ID="ListBox1" runat="server" Height="150px" Width="584px"></asp:ListBox>
- </ContentTemplate>
- </asp:UpdatePanel>
- </div>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement