Generally, after an operation is completed, refresh the page and the scroll bar will return to the top. Sometimes, this will cause us trouble.
For example:
Click Delete comment. We generally want to delete the comment, and the scroll bar remains at the position we just saw.
When we click "Delete comment", the page will be refreshed after deletion is successful. At this time, the scroll bar will return to the top of the page,
It's easy to solve the problem. Use asp.net's tips: www.2cto.com
In the tag at the beginning of the page, enter MaintainScrollPositionOnPostback = "true ",
I think everyone should understand the meaning of this word combination.
[Html]
<% @ Page Title = "JialinTest" Language = "C #" AutoEventWireup = "true"
CodeBehind = "test. aspx. cs" Inherits = "JialinTest. test" MaintainScrollPositionOnPostback = "true" %>
<% @ Page Title = "JialinTest" Language = "C #" AutoEventWireup = "true"
CodeBehind = "test. aspx. cs" Inherits = "JialinTest. test" MaintainScrollPositionOnPostback = "true" %>
From jarin's column