Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Is it possible to somehow use MaintainScrollPositionOnPostback="true" in a template ?
I tried to insert it in the top of the template, but that just results in a yellow screen of death.
Is it possible
Mikael
You may be able to use
<pages maintainScrollPositionOnPostBack="true">
In the web.config (although it will probably affect all pages).
Is this by any chance to maintain scroll position when form validation appears? There's another option if so
<script type="text/javascript"> window.scrollTo = function() { }</script>
disables the scrollto function
If you only want to do it in pages of a particular template you can do it in Page_Load:
Page.MaintainScrollPositionOnPostBack = true;
It's a property of the page not the master page, which is why you're getting a YSOD.
Thanks Rick
Putting it in page load seems to work.
Hi Rick, I am using umbraco 4.0
I have added Page.MaintainScrollPositionOnPostBack = true; in my usercontrol, but no joy, can someone please help
Many thanks in advance
Regards
Praveen
Hi praveen
Did you mange to find a solution to maintain the scroll position on a user control?
I have a calendar and each time the user changes the date it jumps to the top of the page. Cant seem to find a solution on the web.
Cheers
Paul
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
MaintainScrollPositionOnPostback
Is it possible to somehow use MaintainScrollPositionOnPostback="true" in a template ?
I tried to insert it in the top of the template, but that just results in a yellow screen of death.
Is it possible
Mikael
You may be able to use
In the web.config (although it will probably affect all pages).
Is this by any chance to maintain scroll position when form validation appears? There's another option if so
disables the scrollto function
If you only want to do it in pages of a particular template you can do it in Page_Load:
Page.MaintainScrollPositionOnPostBack = true;
It's a property of the page not the master page, which is why you're getting a YSOD.
Thanks Rick
Putting it in page load seems to work.
Mikael
Hi Rick, I am using umbraco 4.0
I have added Page.MaintainScrollPositionOnPostBack = true; in my usercontrol, but no joy, can someone please help
Many thanks in advance
Regards
Praveen
Hi praveen
Did you mange to find a solution to maintain the scroll position on a user control?
I have a calendar and each time the user changes the date it jumps to the top of the page. Cant seem to find a solution on the web.
Cheers
Paul
is working on a reply...