Scroll to Top of page using VB.NET in ASP.NET

This article defines How to automatically scroll back to the top of the page.
  • 2497
Download Files:
 

This article defines How to automatically scroll back to the top of the page.

If your pages are long winded, it's a good idea to provide viewers with an easy way to automatically scroll back to the top of the page. This script displays a stationary control at the lower right corner of the window that when clicked on gently scrolls the page back up to the top. Instead of always being visible on the user's screen, the script lets you specify how far down the page.

Step -1

Add the following code in the head section of the page.

<script type="text/javascript"src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

<script type="text/javascript" src="Scripts/scrolltopcontrol.js">

</script>

This section has the reference of the .js file which named as scrolltopcontrol.

Step-2

Now Adding the .js file in the project directory under the scripts folder. This file is attached with download file. We can download it from that and attach with the project.

image1.gif
 

Image1

Step -3

Now Adding a scroll control in the jquery file. This control is also attached with download file.

Scroll control will be display when your page is long winded.

Step -4

Now run the application.

image2.gif
 

Image2

Here scroll is in visible.

Now Drag scroll to down of page Then scroll control will be display.

Image3

image3.gif
 

Now click on the Scroll control to top of the page.

Categories

More Articles

© 2013 dotNetheaven. All rights reserved.