View Full Version : Asp button redirecting me to top of page.

03-01-2011, 09:14 PM
So I have a asp button on my webpage that when clicked it runs (server side) a vb code that puts text in a textbox. But when I click the button, not only does it do what I want it to do, it refreshes the page (but doesnt delete any text in data fields already entered) and scrolls to the top of the web page. Is there any way that I could preven this from happening or can a have some vb code that tells it to scroll to the button I just clicked? I'm using Microsoft Visual Web Developer 2010.

03-02-2011, 12:30 AM
I swear you guys are ****ing retarded at this forum. all I needed was to add this little bit, and you couldnt figure it out.

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" MaintainScrollPositionOnPostback="true" %>

03-02-2011, 02:44 PM
That's the pot calling the kettle Black