Click here to Skip to main content
15,885,885 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
C#
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" MaintainScrollPositionOnPostback="true" %>
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" ClientIDMode="AutoID">
<asp:ListItem Selected="True" Value="XXX">XXX</asp:ListItem>
<asp:ListItem Value="YYY">YYY</asp:ListItem>
</asp:DropDownList
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" CssClass="BoxShadow table table-hover table-condensed table-bordered RTL" Font-Size="Medium" Font-Bold="true" BackColor="White" BorderStyle="Double">
</asp:GridView>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="DropDownList1" EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>


What I have tried:

I did try to change updatemode and .Net ver.
set the
MaintainScrollPositionOnPostback="true"

but the page goes up after updatepanel refresh
what else can i do???
Posted
Updated 3-Jan-17 20:20pm
v2
Comments
Afzaal Ahmad Zeeshan 1-Jan-17 6:39am    
Maybe your are also facing a GET redirect somewhere. Check the Network tab of browser to see what sort of requests are being made and what is the response.

1 solution

Try this
smartNavigation="true" MaintainScrollPositionOnPostback="true"
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900