Home All Groups Group Topic Archive Search About
Author
29 Mar 2005 7:05 PM
Randel Bjorkquist
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

Author
29 Mar 2005 7:31 PM
Brock Allen
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



Show quote
> 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
>
Author
29 Mar 2005 9:08 PM
Randel Bjorkquist
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


Show quote
"Brock Allen" <ballen@NOSPAMdevelop.com> wrote in message
news:296075632477034614408336@msnews.microsoft.com...
> 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
>>
>
>
>
Author
29 Mar 2005 9:27 PM
Brock Allen
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



Show quote
> 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" <ballen@NOSPAMdevelop.com> wrote in message
> news:296075632477034614408336@msnews.microsoft.com...
>
>> 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
>>>
Author
29 Mar 2005 9:37 PM
Randel Bjorkquist
Hey Brock,

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

Thanks,

Randel Bjorkquist

Show quote
"Brock Allen" <ballen@NOSPAMdevelop.com> wrote in message
news:297071632477104431215472@msnews.microsoft.com...
> 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" <ballen@NOSPAMdevelop.com> wrote in message
>> news:296075632477034614408336@msnews.microsoft.com...
>>
>>> 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
>>>>
>
>
>

AddThis Social Bookmark Button