consultancy chorley ASP.NET Server Side Scripting Wigan
Website Development Radcliffe

A Coder's Notes

Email :
bespoke invoice systems Standish Information Technology Advice Worsley
    development systems Ramsbottom
data manipulation Farnworth access databases Whitefield SQL connections Atherton
online accessible software Leyland software compatible Coppull

Get connected and Online Tottington
remote management Makerfield code and design Aspull

ASP.Net Keeping Page Position - Scroll - 27/02/2013

ASP.Net uses postbacks to get information from the page and process it.  So of course you're filling in a form and working your way down a page.  At some point you may enter something, or trigger an onupdate event.  Typically this is the Calendar for the website's I'm currently working on.  So the calendar is changed causing the page to refresh...and the page goes back to the top.  The user has to scroll down to resume filling in the form, most annoying...

At the top of the aspx page use the following...

<% @ Page MaintainScrollPositionOnPostBack = "True" %>

This causes the page to reload but remain in the same position.  Splendid!  I've not investigated how, I can only guess there's some Javascript magic at work.

Post A Comment

Name Comment
programming services specialist
Valid XHTML 1.0 Transitional