0

I would like to maintain my scroll position when using:

Response.Redirect(Request.RawUrl)

The reason for this is because I have a button in my GridView that updates a value in the Grid. After clicking the button I want to update the value in the Gridview, which needs Response.Redirect(Request.RawUrl) but I also want to maintain the scroll position.

This does not work either:

maintainScrollPositionOnPostback="true" 

I have tried other Javacript methods and they do not work as well, since I am refreshing the page.

How would I do this?

  • possible duplicate of [MaintainScrollPositionOnPostback property doesn't works with mozilla](http://stackoverflow.com/questions/9607139/maintainscrollpositiononpostback-property-doesnt-works-with-mozilla) – Kevin Boucher Jul 01 '15 at 20:19
  • This has nothing to do with that post. Were talking about two different things. – Jerry West Jul 01 '15 at 20:22
  • no need to call `Response.Redirect`, Bind gridview after update and enjoy – Imad Jul 02 '15 at 04:20

1 Answers1

0

I fixed it.

I replaced Response.Redirect(Request.RawUrl) with GridView1.DataBind()