Click here to Skip to main content
15,886,799 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have an ASP.net page, with a Submit button placed at the bottom of the page.

When the user clicks on Submit, I want the page to scroll up. Would that be possible, if so how ?

Please help with syntax.

Thanks
Posted

1 solution

add the below into you aspx file
ASP.NET
<asp:button id="btn_submit" runat="server" text="Sumbit" onclientclick="javascript:window.scrollTo(0,0);"/>
 
Share this answer
 
v13

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900