Stop my window from jumping

Discussion in 'ASP .Net Web Controls' started by Randel Bjorkquist, Mar 29, 2005.

  1. How do I stop my WebForm from jumping back up to the top of the window every
    time it's posted? What is happening is that I have a web-application that
    has a couple of ListBoxes that I allow the end-user to fill in. They are
    asked to fill in a TextBox which I then add to the ListBox. But after the
    Button is clicked and I add the new text to the ListBox, the WebForm reloads
    and positions itself back at the top.



    I was thinking of putting anchor for each section and on a repost go to the
    anchor by the Button. But unfortunately, I'm very new to all of this,
    web-applications, the IDE for Visual Studio 2003 .NET, etc... If anyone has
    some pointers, I'd greatly appreciate it.



    Thanks,



    Randel Bjorkquist
    Randel Bjorkquist, Mar 29, 2005
    #1
    1. Advertising

  2. Randel Bjorkquist

    Brock Allen Guest

    In v1.x you can either use SmartNavigation or code a bunch of javascript
    yourself to call window.setScrollPos when the document reloads after the
    postback. In v2.0 this is a built in feature.

    -Brock
    DevelopMentor
    http://staff.develop.com/ballen



    > How do I stop my WebForm from jumping back up to the top of the window
    > every time it's posted? What is happening is that I have a
    > web-application that has a couple of ListBoxes that I allow the
    > end-user to fill in. They are asked to fill in a TextBox which I then
    > add to the ListBox. But after the Button is clicked and I add the new
    > text to the ListBox, the WebForm reloads and positions itself back at
    > the top.
    >
    > I was thinking of putting anchor for each section and on a repost go
    > to the anchor by the Button. But unfortunately, I'm very new to all
    > of this, web-applications, the IDE for Visual Studio 2003 .NET, etc...
    > If anyone has some pointers, I'd greatly appreciate it.
    >
    > Thanks,
    >
    > Randel Bjorkquist
    >
    Brock Allen, Mar 29, 2005
    #2
    1. Advertising

  3. Brock,

    Thanks for the information. Unfortunately, I'm not following well enough.
    Like I said in my first post, I have done an extremely small amount of web
    programming. I really do not know HTML, DHTML, ASP (any version), etc... As
    for creating a web-application, I'm just Visual Studio 2003 .NET in which
    I've only has one semester of C#.

    But with that being said, I do thank you for your information and will
    continue to look at it as I develop more applications like this.

    Randel


    "Brock Allen" <> wrote in message
    news:...
    > In v1.x you can either use SmartNavigation or code a bunch of javascript
    > yourself to call window.setScrollPos when the document reloads after the
    > postback. In v2.0 this is a built in feature.
    >
    > -Brock
    > DevelopMentor
    > http://staff.develop.com/ballen
    >
    >
    >
    >> How do I stop my WebForm from jumping back up to the top of the window
    >> every time it's posted? What is happening is that I have a
    >> web-application that has a couple of ListBoxes that I allow the
    >> end-user to fill in. They are asked to fill in a TextBox which I then
    >> add to the ListBox. But after the Button is clicked and I add the new
    >> text to the ListBox, the WebForm reloads and positions itself back at
    >> the top.
    >>
    >> I was thinking of putting anchor for each section and on a repost go
    >> to the anchor by the Button. But unfortunately, I'm very new to all
    >> of this, web-applications, the IDE for Visual Studio 2003 .NET, etc...
    >> If anyone has some pointers, I'd greatly appreciate it.
    >>
    >> Thanks,
    >>
    >> Randel Bjorkquist
    >>

    >
    >
    >
    Randel Bjorkquist, Mar 29, 2005
    #3
  4. Randel Bjorkquist

    Brock Allen Guest

    So I'd suggest SmartNavigation then. Open your ASPX and add SmartNavigation=true:

    <%@ Page SmartNavigation=true ..... %>

    And see if that helps.

    -Brock
    DevelopMentor
    http://staff.develop.com/ballen



    > Brock,
    >
    > Thanks for the information. Unfortunately, I'm not following well
    > enough. Like I said in my first post, I have done an extremely small
    > amount of web programming. I really do not know HTML, DHTML, ASP (any
    > version), etc... As for creating a web-application, I'm just Visual
    > Studio 2003 .NET in which I've only has one semester of C#.
    >
    > But with that being said, I do thank you for your information and will
    > continue to look at it as I develop more applications like this.
    >
    > Randel
    >
    > "Brock Allen" <> wrote in message
    > news:...
    >
    >> In v1.x you can either use SmartNavigation or code a bunch of
    >> javascript yourself to call window.setScrollPos when the document
    >> reloads after the postback. In v2.0 this is a built in feature.
    >>
    >> -Brock
    >> DevelopMentor
    >> http://staff.develop.com/ballen
    >>> How do I stop my WebForm from jumping back up to the top of the
    >>> window every time it's posted? What is happening is that I have a
    >>> web-application that has a couple of ListBoxes that I allow the
    >>> end-user to fill in. They are asked to fill in a TextBox which I
    >>> then add to the ListBox. But after the Button is clicked and I add
    >>> the new text to the ListBox, the WebForm reloads and positions
    >>> itself back at the top.
    >>>
    >>> I was thinking of putting anchor for each section and on a repost go
    >>> to the anchor by the Button. But unfortunately, I'm very new to all
    >>> of this, web-applications, the IDE for Visual Studio 2003 .NET,
    >>> etc... If anyone has some pointers, I'd greatly appreciate it.
    >>>
    >>> Thanks,
    >>>
    >>> Randel Bjorkquist
    >>>
    Brock Allen, Mar 29, 2005
    #4
  5. Hey Brock,

    That did the trick and is doing exactally what I want it to.

    Thanks,

    Randel Bjorkquist

    "Brock Allen" <> wrote in message
    news:...
    > So I'd suggest SmartNavigation then. Open your ASPX and add
    > SmartNavigation=true:
    >
    > <%@ Page SmartNavigation=true ..... %>
    >
    > And see if that helps.
    >
    > -Brock
    > DevelopMentor
    > http://staff.develop.com/ballen
    >
    >
    >
    >> Brock,
    >>
    >> Thanks for the information. Unfortunately, I'm not following well
    >> enough. Like I said in my first post, I have done an extremely small
    >> amount of web programming. I really do not know HTML, DHTML, ASP (any
    >> version), etc... As for creating a web-application, I'm just Visual
    >> Studio 2003 .NET in which I've only has one semester of C#.
    >>
    >> But with that being said, I do thank you for your information and will
    >> continue to look at it as I develop more applications like this.
    >>
    >> Randel
    >>
    >> "Brock Allen" <> wrote in message
    >> news:...
    >>
    >>> In v1.x you can either use SmartNavigation or code a bunch of
    >>> javascript yourself to call window.setScrollPos when the document
    >>> reloads after the postback. In v2.0 this is a built in feature.
    >>>
    >>> -Brock
    >>> DevelopMentor
    >>> http://staff.develop.com/ballen
    >>>> How do I stop my WebForm from jumping back up to the top of the
    >>>> window every time it's posted? What is happening is that I have a
    >>>> web-application that has a couple of ListBoxes that I allow the
    >>>> end-user to fill in. They are asked to fill in a TextBox which I
    >>>> then add to the ListBox. But after the Button is clicked and I add
    >>>> the new text to the ListBox, the WebForm reloads and positions
    >>>> itself back at the top.
    >>>>
    >>>> I was thinking of putting anchor for each section and on a repost go
    >>>> to the anchor by the Button. But unfortunately, I'm very new to all
    >>>> of this, web-applications, the IDE for Visual Studio 2003 .NET,
    >>>> etc... If anyone has some pointers, I'd greatly appreciate it.
    >>>>
    >>>> Thanks,
    >>>>
    >>>> Randel Bjorkquist
    >>>>

    >
    >
    >
    Randel Bjorkquist, Mar 29, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David Bird via .NET 247

    DataGrid: jumping to the append row (asterisk)

    David Bird via .NET 247, Apr 16, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    465
    David Bird via .NET 247
    Apr 16, 2004
  2. Jerry

    Holy JUMPING frameset Batman!

    Jerry, Jan 27, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    284
    Jerry
    Jan 27, 2004
  3. Anonymous

    page editor: jumping in virtual space

    Anonymous, Sep 8, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    339
    Anonymous
    Sep 8, 2005
  4. Koos
    Replies:
    16
    Views:
    4,455
    Mitja
    May 8, 2004
  5. jalkadir
    Replies:
    3
    Views:
    408
    jalkadir
    Oct 5, 2005
Loading...

Share This Page