Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
When i press edit in grid view my page move to top. I want page to be on same position. i dont want again to scroll there position should be fixed.. when i click on edit or either update etc etc....
Posted
Updated 10-Jul-19 2:13am

hi boss!
you have to add
MaintainScrollPositionOnPostback="true"
like

<![CDATA[<%@ Page Language="C#" MaintainScrollPositionOnPostback="true" AutoEventWireup="true" Inherits="PropertyManagement" Codebehind="PropertyManagement.aspx.cs" %>

in page directive.
It maintains your scroll position after postback.
 
Share this answer
 
v2
And you can use smartnavigation=true in page directive
 
Share this answer
 
hi,

use update panel int your page will will help u from post back
in html


<asp:ScriptManager ID="ScriptManager1" runat="server" >

XML
<asp:UpdatePanel ID="upnlAddBank" runat="server">
       <ContentTemplate>



place your code //like grid view


</ContentTemplate>
</asp:UpdatePanel>
 
Share this answer
 
I agree with the first solution. You should add
MaintainScrollPositionOnPostback="true"
 
Share this answer
 

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