...
function saveScrollPos(object)
{
document.getElementById('scrollPos').value = object.scrollTop;
}
function setScrollPos(elementId)
{
document.getElementById(elementId).scrollTop = document.getElementById('scrollPos').value;
}
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Niradhip ChakrabortyRank #429 · 5.8K reputationPosted May 5, 2009, 4:42 AM EDT
Add this code in pageload:
if you are using vs2005:
Page.MaintainScrollPositionOnPostBack = true;
if you are using vs2003:
Page.SmartNavigation = true;
Raghavendra URank #1,371 · 1.2K reputationPosted May 21, 2009, 9:01 PM EDT
Anders Hundborg4 reputationPosted Jul 5, 2009, 3:20 AM EDT