Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Building Controls / August 2006

Tip: Looking for answers? Try searching our database.

Position in Page after a "Submit"

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paul - 16 Aug 2006 11:42 GMT
I'm just in the process of developing a web server component and have come
up against one final problem.  It's like a data grid in that it displays
rows of data - which can be edited / updated in-line.  The edit / update
buttons are child ASP:button controls.  I have all the functionality working
as I intended, however whilst the data / screen layout is updated
accordingly when you click a page, the page itself is redisplayed at the top
of the document (so you lose your position in the html page and have to
scroll back down).   Is there a way to programmatically update the position
within the page, or do you have to define Href anchor points within your
component and modify the form post location accordingly in the client side
javascript/vbscript that is output by the ASP:button (which i guess would
require me to override / modify the ASP:button as well).  Any hints / tips
would be greatly appreciated.

Regards,

- Paul.
Steve C. Orr [MVP, MCSD] - 19 Aug 2006 05:48 GMT
In ASP.NET 1.x, if you enable SmartNavigation on the page, it should be able
to retain the scroll position after postback.

Here's more info:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlr
fSystemWebUIPageClassSmartNavigationTopic.asp


If you're using ASP.NET 2.0, there is a (usually) better alternative:
Page.MaintainScrollPositionOnPostBack = True

Here's more info:
http://msdn2.microsoft.com/en-us/library/system.web.ui.page.maintainscrollpositi
ononpostback.aspx


Signature

I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net

> I'm just in the process of developing a web server component and have come
> up against one final problem.  It's like a data grid in that it displays
[quoted text clipped - 13 lines]
>
> - Paul.
Paul - 21 Aug 2006 08:21 GMT
That's great, thanks for the help.  Thanks also for not pointing out that
I'd forgotten to add which version of DotNet I was using (it was 2.0).

> In ASP.NET 1.x, if you enable SmartNavigation on the page, it should be
> able
[quoted text clipped - 27 lines]
>>
>> - Paul.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.