Multiple choice technology web technology

How can we maintain the page scroll position after postback?

  1. Set PositionOnPostback as true in Page directive

  2. Set MaintainScrollPositionOnPostback as true in Page directive

  3. Set ViewState as true in Page directive

  4. Not Possible

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The MaintainScrollPositionOnPostback attribute in the Page directive preserves the scroll position across postbacks by storing it in a hidden field. This prevents the page from jumping back to the top after a server-side event. PositionOnPostback is not a valid attribute, and ViewState handles state management, not scroll position.