How to move vertical scroll bar using javascript in ASP.Net Web Form

No.of Views2580
Bookmarked0 times
Downloads 
Votes0
By  mcapassion   On  16 Feb 2010 00:02:53
Tag : ASP.NET , HTML and CSS
How to move vertical scroll bar using javascript in ASP.Net Web Form
emailbookmarkadd commentsprint

Images in this article missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at info@codegain.com

 

Introdcution


Whenever ASP.NET Web Form page loaded, by defualt its focus set to first control (vertical scroll bar moved downward in this case) in the ASP.Net web form page. If you required to move your vertical scroll bar to the top of the page, then following client-side script help you in achieving this task:



Code Snippet

{codecitation class="brush: javascript; gutter: true;" width="650px"}


function moveVerticalScroll()
{
document.body.scrollTop=0;
}
window.onload=moveVerticalScroll;

{/codecitation}

Thank you

About the Author


Amit Kumar
Description :5+ years of work experience in ASP.NET C# applications development and database design. 2+ years in SharePoint Worked on SQL Server Worked on Object oriented design and UML Programming Languages/Framework : C#.Net, VB.Net, VB 6.0, VBA,Com/DCom Web Languages : HTML, DHTML, ASP, JavaScript, ASP.Net Operating Systems : WIN 98/2000NT/XP/2003 Server DBMS/RDBMS : MS-Access 2000, ORACLE 8.0, MS-SQL Server 2000, MS-SQL Server 2005 Designing Tools : Microsoft Visio 2003 Versioning Tools : Microsoft Visual Source Safe 6.0 Content Management : Plumtree 4.5 WS, SharePoint (MOSS) Experience in developing Portals using Plumtree 4.5 WS and SharePoint. Experience in user-interface design, user controls, web parts and layout for web-based applications using HTML, CSS, ASP and ASP.net.

Occupation :Software Engineer
Company : Haryana.
Location : India

 
Sign Up to vote for this article
 
About Author
 
mcapassion
Occupation-Not Provided
Company-Not Provided
Member Type-Fresh
Location-Not Provided
Joined date-08 Jul 2009
Home Page-Not Provided
Blog Page-Not Provided
 
 
Other popularSectionarticles
Comments
By:32Date Of Posted:2/24/2011 12:30:40 AM
32
32322222
Leave a Reply
Title:
Display Name:
Email:
(not display in page for the security purphase)
Website:
Message:
Please refresh your screen using Ctrl+F5
If you can't read this number refresh your screen
Please input the anti-spam code that you can read in the image.
^ Scroll to Top