dc

dc

  • NA
  • 663
  • 0

retain scrollbar position

Jul 18 2012 2:47 PM
In a C# 2010 web form application that uses web form controls, I have a scrollbar used on a panel control. The user would like to be able to retain the scrollbar position while they are on the current web form page. They would like the scrollbar to retain its position until they have pointed to the next web form page. Since I do not know how to accomplish this goal, I am wondering how to accomplish this task.

The asp.net markup looks like the following:

<asp:Panel ID="Panel1" runat="server" ScrollBars="Auto" Height="130px" Width="455"  CssClass="TextBoxStyle">  <asp:CheckBoxList ID="ChkBoxLst" runat="server" AutoPostBack="true">  </asp:CheckBoxList>  </asp:Panel>

What I am trying to say is the following:

To state the question better:  There is a web  form with a checkbox list control in a tall panel with scrollbars set to auto. The user clicks on the checkbox, and it alters the form, and during the parital or whole page postback, the panel scroll position defaults back to the top. How do I reset the scroll position to where the user left it, during a partial or whole page postback.