Avatar of Bob_ET
Bob_ET
Flag for United States of America asked on

ASP.NET Page Not Returning to Last Screen position After Postback

Hello Folks

I have an application for adding order information.
It works fine.
The problem I have is that the page is quite long, spanning several pages in height.

When a user clicks on a checkbox or a dropdown, an autopostback fires.
That's fine.
But instead of the user staying at the same location on the page, the page is refreshed to the top of the screen.

This is annoying the users since they have to scroll down to where they left off everytime a click event takes place.

I am running .NET Framework v:2.0.50727

I have tried using ScriptManager and JavaScript, but a parser error returns saying "Unknown server tag asp:ScriptManager".

If someone can help me with resuming the page position after postback, that would be great.
If I need to use ScriptManager then that's the second problem that has to be fixed.

Thanks
Web Languages and StandardsWeb Development Software

Avatar of undefined
Last Comment
sammySeltzer

8/22/2022 - Mon
SOLUTION
Kyle Abrahams

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER CERTIFIED SOLUTION
sammySeltzer

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Bob_ET

ASKER
The web.config entry failed because Ajax is not on my server.
Now i have to install and config ASP.NET Ajax.
sammySeltzer

What exact error message are you getting?

If the error you are getting is same as the one on your original post, then you will need to add server tag prefix at begining of your page, something like this:

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

Then in the body of your html, you would start with:

<cc1:Scriptmanager...></cc1>

Please see below for more:

http://blog.turlov.com/2008/05/scriptmanager-vs-toolkitscriptmanager.html:
Kyle Abrahams

you need ajax for the update panel.  Ajax is very useful and would highly recommend using.
Your help has saved me hundreds of hours of internet surfing.
fblack61
Bob_ET

ASKER
It seems ASP.NET Ajax wasn't installed

Parser Error Message: Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. The system cannot find the file specified.
sammySeltzer

Well, all you need is download and install it. Then add the dll to your bin directory.

After adding to your bin directory, go to your solution, right-click, select add Reference.

Browse through your bin directory, select it and you should be fine after that.