473,608 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HELP: Page.MaintainSc rollPositionOnP ostback implementation

Hi,

I've tried using the Page.MaintainSc rollPositionOnP ostback property to keep
the users' focus on the web control they are currently editing on
AutoPostBack=tr ue. 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 MaintainScrollP ositionOnPostba ck=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 MaintainScrollP ositionOnPostba ck property
conditionally, but I noticed an awkward behaviour of the
MaintainScrollP ositionOnPostba ck: 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? MaintainScrollP ositionOnPostba ck seems to render
client code which is interpreted and used for the next render cycle if
present. Is it possible to conditionally suppress the
MaintainScrollP ositionOnPostba ck information returned by the "first"
postback?

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

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

Similar topics

13
6216
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? I'm basically trying to set it up so that I can keep the User infor (userid, ect) in the Masterpage so that other pages can access it. Thanks for any ideas. Michael
2
1955
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 persist the user's scroll position in a datagrid, are there any other options? Thanks
0
1007
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 will not have the scrollpostion stuff set yet and will go to the top of 1st next postback again. How to overrule once?
3
3043
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 look like? MaintainScrollPositionOnPostback ViewStateEncryptionMode LinePragmas Title
1
1697
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 on the server that could cause such a problem? Thanks, Keith
3
4404
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 the user was at the bottom of the page then it looks ugly. Is there a way IE can go back to the same location after postback or reload? Thanks
4
1280
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 selected in the accordion. in the Repeater I've a checkbox (one for eache repeated field) checked by default that I select/deselect triggering the method OnCheckedChanged which updates the record in the table connected to the repeater.
3
3125
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 page where 'go_here' was. I need to do something like that, but Visual Studio doesn't have any tag that looks like: <a name="etc Is this something that can be done in VS?
4
4018
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 scroll position? I set the page directive of Enable View State to true but tht didn't help. Thanks.
0
8503
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8488
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8360
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6017
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5489
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3977
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4039
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2482
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1613
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.