473,386 Members | 1,733 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

HELP: Page.MaintainScrollPositionOnPostback implementation

Hi,

I've tried using the Page.MaintainScrollPositionOnPostback property to keep
the users' focus on the web control they are currently editing on
AutoPostBack=true. Yet, there are cases when I DON'T want the scroll
position to be maintained on postback, e.g. when server-side errors occur,
being displayed at the top of the page.

With MaintainScrollPositionOnPostback=true users don't get to see the error
list and, thus, wonder why they can't submit the page.

I've tried to set the MaintainScrollPositionOnPostback property
conditionally, but I noticed an awkward behaviour of the
MaintainScrollPositionOnPostback: It is NOT being interpreted for the
current render cycle, but instead it only defines how the page behaves with
the NEXT postback.

This brings up two questions:

a) Why is this property defined as a property instead of being a Page
directive if it can be set to a constant value only?

b) Is there a workaround? MaintainScrollPositionOnPostback seems to render
client code which is interpreted and used for the next render cycle if
present. Is it possible to conditionally suppress the
MaintainScrollPositionOnPostback information returned by the "first"
postback?

TIA,
Axel Dahmen
Aug 15 '07 #1
0 1526

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Michael | last post by:
I have setup a public variable in the Master Page "code-behind-file". Now I would like to set that value from the UserControl, but I can't seem to find a way to do this. Does anyone have any ideas?...
2
by: Zamdrist | last post by:
Use of SmartNaviagtion appear to cause a serious perfomance hit, I'm not working with ASP.Net 2.0 yet so MaintainScrollPositionOnPostback=True isn't an option either. Is there a way I can...
0
by: Edwin Knoppert | last post by:
On error i need to scroll the window to a certain field or if not possible the top of the form. By default i set MaintainScrollPositionOnPostBack and i can unset it on error but the next postback...
3
by: xeroxero | last post by:
I would like to set the following Page directives in my C# code-behind for ASP.NET 2.0 Web Application Project and also in a ASP.NET 2.0 Web Site. What event should I hook and what should the code...
1
by: Keithb | last post by:
I have identical ASP.NET 2.0 code running on two different iis 6.0 w2k3 servers. On one MaintainScrollPositionOnPostBack works properly. On the other it does not work at all. What should I look for...
3
by: =?Utf-8?B?bWF2cmlja18xMDE=?= | last post by:
Hi, I have a page and if a user posts back data the page would open at the top. This is not a problem if the user was looking at the content on the top of the page , but if the page is long and...
4
by: Vittorix | last post by:
I riepilogate with corrections and updates: I've an Ajax Accordion that gets data from a database, in its content there is a Repeater that gets data from another table, depending which header is...
3
by: COHENMARVIN | last post by:
In html I learned that you could have a tag such as: <a name="go_here"> Then, if you linked to the page, as follows <a href="MyPage.htm#go_here"> You would go to the particular position in the...
4
by: Bobby Edward | last post by:
I have a long form. When I click the submit button at the bottom the page does some validation. But, it always refreshes and the page is at the "top" again. How can I have it "retain" it's...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.