A
Axel Dahmen
Hi,
I've tried using the Page.MaintainScrollPositionOnPostback property to keep
the users' focus on the web control they are currently editing on
AutoPostBack=true. Yet, there are cases when I DON'T want the scroll
position to be maintained on postback, e.g. when server-side errors occur,
being displayed at the top of the page.
With MaintainScrollPositionOnPostback=true users don't get to see the error
list and, thus, wonder why they can't submit the page.
I've tried to set the MaintainScrollPositionOnPostback property
conditionally, but I noticed an awkward behaviour of the
MaintainScrollPositionOnPostback: It is NOT being interpreted for the
current render cycle, but instead it only defines how the page behaves with
the NEXT postback.
This brings up two questions:
a) Why is this property defined as a property instead of being a Page
directive if it can be set to a constant value only?
b) Is there a workaround? MaintainScrollPositionOnPostback seems to render
client code which is interpreted and used for the next render cycle if
present. Is it possible to conditionally suppress the
MaintainScrollPositionOnPostback information returned by the "first"
postback?
TIA,
Axel Dahmen
I've tried using the Page.MaintainScrollPositionOnPostback property to keep
the users' focus on the web control they are currently editing on
AutoPostBack=true. Yet, there are cases when I DON'T want the scroll
position to be maintained on postback, e.g. when server-side errors occur,
being displayed at the top of the page.
With MaintainScrollPositionOnPostback=true users don't get to see the error
list and, thus, wonder why they can't submit the page.
I've tried to set the MaintainScrollPositionOnPostback property
conditionally, but I noticed an awkward behaviour of the
MaintainScrollPositionOnPostback: It is NOT being interpreted for the
current render cycle, but instead it only defines how the page behaves with
the NEXT postback.
This brings up two questions:
a) Why is this property defined as a property instead of being a Page
directive if it can be set to a constant value only?
b) Is there a workaround? MaintainScrollPositionOnPostback seems to render
client code which is interpreted and used for the next render cycle if
present. Is it possible to conditionally suppress the
MaintainScrollPositionOnPostback information returned by the "first"
postback?
TIA,
Axel Dahmen