Link to home
Start Free TrialLog in
Avatar of Bob_ET
Bob_ETFlag 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
SOLUTION
Avatar of Kyle Abrahams, PMP
Kyle Abrahams, PMP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of 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.
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:
you need ajax for the update panel.  Ajax is very useful and would highly recommend using.
Avatar of 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.
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.