The issue im having is a user checks the checkbox and scrolls down, the vertical position moves back to before scrolling of user about a second later.
I have a checkbox inside a repeater, the checkbox has autopost set to true and i run some code if its checked/unchecked. I also have maintainscrollbackposition as true.
Can anyone help please? can this be fixed?
<asp:Repeater ID="rpFactorLeadershipStrengths" OnItemDataBound="rpFactorLeadershipStrengths_OnItemDataBound" runat="server">
<ItemTemplate>
<label class="checkbox">
<asp:CheckBox ID="cbLeadershipStrengthStatement" AutoPostBack="true" OnCheckedChanged="cbLeadershipStrengthStatement_OnCheckedChanged" runat="server" />
<small><asp:Literal ID="ltLeadershipStrengthStatement" runat="server" /></small>
</label>
<asp:HiddenField ID="hfLeadershipStrengthStatementId" runat="server" />
</ItemTemplate>
</asp:Repeater>
For Same you have to Do these steps
1 Write following code in Page_Load event of page.
2 Right click on solution explorer > Add New Item
Select Browser File and add it to App_Browsers folder.
Add MaintainScrollPositionOnPostback capability to this browser file as written below.
3 You can use scrollsaver javascript file to maintain scroll position In Chrome.
For Other Reference please visit this link See Reference
Hope it will helps you.