直到现在才找到任何解决方案。 嗨专家, 我遇到了问题。我有一个asp页面。我想在此页面上应用保持滚动位置。我使用过
Not find any solution till Now. Hi Experts, I am facing a problem.I have a asp page. I want to apply Maintain scroll position on this page. I have used
MaintainScrollPositionOnPostback="true"所有树类型(在cs,aspx和web配置中)和许多其他Javascript函数(在谷歌搜索后)。但没有java脚本函数适合我。如果有人对我如何在我的页面上保持我的滚动位置有所了解。请帮助我。我google了很多,但直到现在才找到任何解决方案..例如我使用了java脚本的功能,如...
by all tree types (on cs,aspx and in web config) and many other Javascript functions (after googled).but no java script function works for me. If anyone have an Idea about how I Maintain my Scroll Position on my page .Please help Me. I googled a lots but not found any solution till now ..for example I used functions of java scripts like...
<form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" ScriptMode="Release" /> <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> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:Panel ID="Panel1" runat="server" Height="300"> <----"my html table code here which have drop down,textbox,radiobutton,button etc controls"-----> </asp:Panel> </ContentTemplate> </asp:UpdatePanel> and many othes functions. Thanks </form>推荐答案
get(' <%= Panel1.ClientID%>')!= null ) { xPos = get('<%=Panel1.ClientID%>') != null) { xPos =
get(' <%= Panel1 .ClientID%GT;')scrollLeft。 yPos = get('<%=Panel1.ClientID%>').scrollLeft; yPos =
get(' <%= Panel1。的ClientID%GT;')scrollTop的。 } } 函数EndRequestHandler(sender,args){ if ( get('<%=Panel1.ClientID%>').scrollTop; } } function EndRequestHandler(sender, args) { if (
更多推荐
在ASP.NET中回发时维护面板滚动位置
发布评论