Click here to Skip to main content
14,242,790 members
Rate this:
Please Sign up or sign in to vote.
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
Rate this:
Please Sign up or sign in to vote.

Solution 1

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.
   
v2
Rate this:
Please Sign up or sign in to vote.

Solution 2

And you can use smartnavigation=true in page directive
   
Rate this:
Please Sign up or sign in to vote.

Solution 4

hi,

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


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

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



place your code //like grid view


</ContentTemplate>
</asp:UpdatePanel>
   
Rate this:
Please Sign up or sign in to vote.

Solution 3

I agree with the first solution. You should add
MaintainScrollPositionOnPostback="true"
   

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100