This blog is moved to
http://amalhashim.wordpress.com

Wednesday, July 9, 2008

Scrolling Div to bottom

//div1 is the id of the div tag to be scrolled
private void ScrollToBottom()
{
string jscript =
"objDiv = document.getElementById('div1');
objDiv.scrollTop=objDiv.scrollHeight;";

ScriptManager.RegisterClientScriptBlock(this.Page, typeof(Page), "scrollscript", jscript, true);
}

No comments: