Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Feb 2011
    Posts
    18
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Asp button redirecting me to top of page.

    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.

  • #2
    New Coder
    Join Date
    Feb 2011
    Posts
    18
    Thanks
    6
    Thanked 0 Times in 0 Posts
    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.
    Code:
    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" MaintainScrollPositionOnPostback="true" %>

  • #3
    Regular Coder Freon22's Avatar
    Join Date
    May 2005
    Location
    USA
    Posts
    287
    Thanks
    3
    Thanked 5 Times in 5 Posts
    That's the pot calling the kettle Black
    I was wondering why frisbees got bigger as they got closer, then it hit me.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •