Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Our developer left recently, trying to finish one of his old projects

Status
Not open for further replies.

33788

IS-IT--Management
Mar 15, 2005
97
US
We have a site developed in .aspx that users can edit the fields, update it, and delete. All the data is being pulled from a SQL 2005 database. Somehow Report Server is involved also. But to do the edit, update, delete, etc.. is all done in the .aspx site. All works fine but when someone clicks edit it works but the page refreshes back to the top then you'll have to scroll down back to your field you wanted to edit. Wondering if their is any way around this refresh to the top issue to where when someone clicks edit it just flips over to edit mode and stay at the same field or even if it refreshes brings you back to the record you want to edit. Any advice will be much appreciated, thanks.
 
You might find more assistance with this issue in the ASP.NET forum. Forum855

------------------------------------------------------------------------------------------------------------------------
"Men occasionally stumble over the truth, but most of them pick themselves up and hurry off as if nothing ever happened."
- Winston Churchill
 
I would imagine the only way to make the page scroll to a specific part would be to add Anchor <a> tags on each field, and append #1 (or whatever the tag name is) to the URL when doing the redirect.
However my knowledge of ASP.net is pretty shoddy so I'm not sure about the implications of this as I think it automatically submits the form when you press a button.
Worth a shot though..


Nick (Webmaster)

 
I know in the 2.0 framework there is a Page Directive command you set to true, so when the page refreshes you stay at your current spot on the page. The name I do not recall but I can find out when I get home. But it is a page directive attribute. Not sure if it exists with framework 1.1.
 
Thanks for the prompt reply all. That information is much appreciated. Just got another questions where would I put this <%@ Page MaintainScrollPositionOnPostback="true" %>? Would it go into the default.aspx or the web.config? Also where inside of it would it go? I'm a newbie at all this stuff, thanks ahead.
 
The page directive would go at the very top of any page that you want this to work for. Also you could put it in the web.config file for all your pages, the code to do this is in the msdn link I provided in my last reply.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top