473,769 Members | 4,999 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

scroll position

Hi all,

I have a long web form on asp.net 2.0. When I go at the bottom and click on
submit, a postback occurs and if there are any validation errors (no
client-side checking being done), the page loads again, but this time the
scroll position is at the bottom. This is annoying, because the actual
validation error messages are on the top and the user cannot see them. Any
ideas? I have turned off maintainscrollb ackpositiononpo stback in the pages
element in web.config. What am I missing?

TIA!
Nov 19 '05 #1
6 2341
Do you have the MaintainScrollP ositionOnPostba ck page attribute set in your
page? Check your HTML at the top of the page. Do you have SmartNavigation
on?

-Andrew
<pa***@communit y.nospam> wrote in message
news:eh******** ******@TK2MSFTN GP09.phx.gbl...
Hi all,

I have a long web form on asp.net 2.0. When I go at the bottom and click
on submit, a postback occurs and if there are any validation errors (no
client-side checking being done), the page loads again, but this time the
scroll position is at the bottom. This is annoying, because the actual
validation error messages are on the top and the user cannot see them. Any
ideas? I have turned off maintainscrollb ackpositiononpo stback in the pages
element in web.config. What am I missing?

TIA!

Nov 19 '05 #2
Nopes, nothing set on the top of my page in the page attribute.... i checked
the top of my page..

"Andrew Robinson" <ne****@nospam. nospam> wrote in message
news:OA******** ******@TK2MSFTN GP09.phx.gbl...
Do you have the MaintainScrollP ositionOnPostba ck page attribute set in
your page? Check your HTML at the top of the page. Do you have
SmartNavigation on?

-Andrew
<pa***@communit y.nospam> wrote in message
news:eh******** ******@TK2MSFTN GP09.phx.gbl...
Hi all,

I have a long web form on asp.net 2.0. When I go at the bottom and click
on submit, a postback occurs and if there are any validation errors (no
client-side checking being done), the page loads again, but this time the
scroll position is at the bottom. This is annoying, because the actual
validation error messages are on the top and the user cannot see them.
Any ideas? I have turned off maintainscrollb ackpositiononpo stback in the
pages element in web.config. What am I missing?

TIA!


Nov 19 '05 #3
Hi Param,

I just perform some tests on my local environment by some simple pages with
long data items and validation controls. Seems the page will maintain
scroll position only when I turn on "maintainScroll PositionOnPostB ack"
property. Is the problem only occurs on a particular page on your side or
have you try building a simple page with long list item and validation
control to see whether it also suffers the problem? If convenient, I
suggest you post a simple reproduce page so that we can also perform some
local test on that.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| From: <pa***@communit y.nospam>
| References: <eh************ **@TK2MSFTNGP09 .phx.gbl>
<OA************ **@TK2MSFTNGP09 .phx.gbl>
| Subject: Re: scroll position
| Date: Wed, 9 Nov 2005 21:25:25 -0600
| Lines: 30
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
| X-RFC2646: Format=Flowed; Response
| Message-ID: <#i************ **@TK2MSFTNGP14 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: corp.lazardgrou p.com 64.237.78.178
| Path: TK2MSFTNGXA02.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGP14.phx. gbl
| Xref: TK2MSFTNGXA02.p hx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:3569 10
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
|
| Nopes, nothing set on the top of my page in the page attribute.... i
checked
| the top of my page..
|
| "Andrew Robinson" <ne****@nospam. nospam> wrote in message
| news:OA******** ******@TK2MSFTN GP09.phx.gbl...
| > Do you have the MaintainScrollP ositionOnPostba ck page attribute set in
| > your page? Check your HTML at the top of the page. Do you have
| > SmartNavigation on?
| >
| > -Andrew
| >
| >
| > <pa***@communit y.nospam> wrote in message
| > news:eh******** ******@TK2MSFTN GP09.phx.gbl...
| >> Hi all,
| >>
| >> I have a long web form on asp.net 2.0. When I go at the bottom and
click
| >> on submit, a postback occurs and if there are any validation errors
(no
| >> client-side checking being done), the page loads again, but this time
the
| >> scroll position is at the bottom. This is annoying, because the actual
| >> validation error messages are on the top and the user cannot see them.
| >> Any ideas? I have turned off maintainscrollb ackpositiononpo stback in
the
| >> pages element in web.config. What am I missing?
| >>
| >> TIA!
| >>
| >
| >
|
|
|

Nov 19 '05 #4
Steve, I had set the property to false in the web.config under pages
element. It looks like it doesnt want to obey that setting. I have to
actually set the property on each .aspx page at the top with the page
attribute for it not to do that...

Thanks

"Steven Cheng[MSFT]" <st*****@online .microsoft.com> wrote in message
news:bt******** ******@TK2MSFTN GXA02.phx.gbl.. .
Hi Param,

I just perform some tests on my local environment by some simple pages
with
long data items and validation controls. Seems the page will maintain
scroll position only when I turn on "maintainScroll PositionOnPostB ack"
property. Is the problem only occurs on a particular page on your side or
have you try building a simple page with long list item and validation
control to see whether it also suffers the problem? If convenient, I
suggest you post a simple reproduce page so that we can also perform some
local test on that.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| From: <pa***@communit y.nospam>
| References: <eh************ **@TK2MSFTNGP09 .phx.gbl>
<OA************ **@TK2MSFTNGP09 .phx.gbl>
| Subject: Re: scroll position
| Date: Wed, 9 Nov 2005 21:25:25 -0600
| Lines: 30
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
| X-RFC2646: Format=Flowed; Response
| Message-ID: <#i************ **@TK2MSFTNGP14 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: corp.lazardgrou p.com 64.237.78.178
| Path: TK2MSFTNGXA02.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGP14.phx. gbl
| Xref: TK2MSFTNGXA02.p hx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:3569 10
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
|
| Nopes, nothing set on the top of my page in the page attribute.... i
checked
| the top of my page..
|
| "Andrew Robinson" <ne****@nospam. nospam> wrote in message
| news:OA******** ******@TK2MSFTN GP09.phx.gbl...
| > Do you have the MaintainScrollP ositionOnPostba ck page attribute set in
| > your page? Check your HTML at the top of the page. Do you have
| > SmartNavigation on?
| >
| > -Andrew
| >
| >
| > <pa***@communit y.nospam> wrote in message
| > news:eh******** ******@TK2MSFTN GP09.phx.gbl...
| >> Hi all,
| >>
| >> I have a long web form on asp.net 2.0. When I go at the bottom and
click
| >> on submit, a postback occurs and if there are any validation errors
(no
| >> client-side checking being done), the page loads again, but this time
the
| >> scroll position is at the bottom. This is annoying, because the
actual
| >> validation error messages are on the top and the user cannot see
them.
| >> Any ideas? I have turned off maintainscrollb ackpositiononpo stback in
the
| >> pages element in web.config. What am I missing?
| >>
| >> TIA!
| >>
| >
| >
|
|
|

Nov 19 '05 #5
As an alternative to this Autopostback Scroll postion try sticking these
lines just above the </form> tag in your ASPX file:

<script language="JavaS cript">
<!--
<%-- For Autopostback Autoscrolling feature --%>
location.href=' # <%= Request.Form("_ _EVENTTARGET") %>';
//-->
</script>

Or with a slight enhancement:

<script language="JavaS cript">
<!--
<%-- For Autopostback Autoscrolling feature --%>
<%= IIf(Len(Request .Form("__EVENTT ARGET")) > 0,
"location.href= '#"& Request.Form("_ _EVENTTARGET") &"';", "") %>
//-->
</script>
<pa***@communit y.nospam> wrote in message
news:et******** ******@TK2MSFTN GP11.phx.gbl...
Steve, I had set the property to false in the web.config under pages
element. It looks like it doesnt want to obey that setting. I have to
actually set the property on each .aspx page at the top with the page
attribute for it not to do that...

Thanks

"Steven Cheng[MSFT]" <st*****@online .microsoft.com> wrote in message
news:bt******** ******@TK2MSFTN GXA02.phx.gbl.. .
Hi Param,

I just perform some tests on my local environment by some simple pages
with
long data items and validation controls. Seems the page will maintain
scroll position only when I turn on "maintainScroll PositionOnPostB ack"
property. Is the problem only occurs on a particular page on your side or have you try building a simple page with long list item and validation
control to see whether it also suffers the problem? If convenient, I
suggest you post a simple reproduce page so that we can also perform some local test on that.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| From: <pa***@communit y.nospam>
| References: <eh************ **@TK2MSFTNGP09 .phx.gbl>
<OA************ **@TK2MSFTNGP09 .phx.gbl>
| Subject: Re: scroll position
| Date: Wed, 9 Nov 2005 21:25:25 -0600
| Lines: 30
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
| X-RFC2646: Format=Flowed; Response
| Message-ID: <#i************ **@TK2MSFTNGP14 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: corp.lazardgrou p.com 64.237.78.178
| Path: TK2MSFTNGXA02.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGP14.phx. gbl
| Xref: TK2MSFTNGXA02.p hx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:3569 10
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
|
| Nopes, nothing set on the top of my page in the page attribute.... i
checked
| the top of my page..
|
| "Andrew Robinson" <ne****@nospam. nospam> wrote in message
| news:OA******** ******@TK2MSFTN GP09.phx.gbl...
| > Do you have the MaintainScrollP ositionOnPostba ck page attribute set in | > your page? Check your HTML at the top of the page. Do you have
| > SmartNavigation on?
| >
| > -Andrew
| >
| >
| > <pa***@communit y.nospam> wrote in message
| > news:eh******** ******@TK2MSFTN GP09.phx.gbl...
| >> Hi all,
| >>
| >> I have a long web form on asp.net 2.0. When I go at the bottom and
click
| >> on submit, a postback occurs and if there are any validation errors
(no
| >> client-side checking being done), the page loads again, but this time the
| >> scroll position is at the bottom. This is annoying, because the
actual
| >> validation error messages are on the top and the user cannot see
them.
| >> Any ideas? I have turned off maintainscrollb ackpositiononpo stback in the
| >> pages element in web.config. What am I missing?
| >>
| >> TIA!
| >>
| >
| >
|
|
|


Nov 19 '05 #6
Thanks for the followup Param,

I think the problem is possibly project specific. If convenient, you can
also try creating a new web project (make sure simple page with long items
obey the scroll setting ruls in the web.config ) and then copy your pages
there to see whether it works.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| From: <pa***@communit y.nospam>
| References: <eh************ **@TK2MSFTNGP09 .phx.gbl>
<OA************ **@TK2MSFTNGP09 .phx.gbl>
<#i************ **@TK2MSFTNGP14 .phx.gbl>
<bt************ **@TK2MSFTNGXA0 2.phx.gbl>
| Subject: Re: scroll position
| Date: Thu, 10 Nov 2005 09:03:38 -0600
| Lines: 94
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
| Message-ID: <et************ **@TK2MSFTNGP11 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: corp.lazardgrou p.com 64.237.78.178
| Path:
TK2MSFTNGXA02.p hx.gbl!TK2MSFTN GXA03.phx.gbl!T K2MSFTNGP08.phx .gbl!TK2MSFTNGP 1
1.phx.gbl
| Xref: TK2MSFTNGXA02.p hx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:3570 38
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
|
| Steve, I had set the property to false in the web.config under pages
| element. It looks like it doesnt want to obey that setting. I have to
| actually set the property on each .aspx page at the top with the page
| attribute for it not to do that...
|
| Thanks
|
| "Steven Cheng[MSFT]" <st*****@online .microsoft.com> wrote in message
| news:bt******** ******@TK2MSFTN GXA02.phx.gbl.. .
| > Hi Param,
| >
| > I just perform some tests on my local environment by some simple pages
| > with
| > long data items and validation controls. Seems the page will maintain
| > scroll position only when I turn on "maintainScroll PositionOnPostB ack"
| > property. Is the problem only occurs on a particular page on your side
or
| > have you try building a simple page with long list item and validation
| > control to see whether it also suffers the problem? If convenient, I
| > suggest you post a simple reproduce page so that we can also perform
some
| > local test on that.
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
| >
| >
| >
| > --------------------
| > | From: <pa***@communit y.nospam>
| > | References: <eh************ **@TK2MSFTNGP09 .phx.gbl>
| > <OA************ **@TK2MSFTNGP09 .phx.gbl>
| > | Subject: Re: scroll position
| > | Date: Wed, 9 Nov 2005 21:25:25 -0600
| > | Lines: 30
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
| > | X-RFC2646: Format=Flowed; Response
| > | Message-ID: <#i************ **@TK2MSFTNGP14 .phx.gbl>
| > | Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| > | NNTP-Posting-Host: corp.lazardgrou p.com 64.237.78.178
| > | Path: TK2MSFTNGXA02.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGP14.phx. gbl
| > | Xref: TK2MSFTNGXA02.p hx.gbl
| > microsoft.publi c.dotnet.framew ork.aspnet:3569 10
| > | X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
| > |
| > | Nopes, nothing set on the top of my page in the page attribute.... i
| > checked
| > | the top of my page..
| > |
| > | "Andrew Robinson" <ne****@nospam. nospam> wrote in message
| > | news:OA******** ******@TK2MSFTN GP09.phx.gbl...
| > | > Do you have the MaintainScrollP ositionOnPostba ck page attribute set
in
| > | > your page? Check your HTML at the top of the page. Do you have
| > | > SmartNavigation on?
| > | >
| > | > -Andrew
| > | >
| > | >
| > | > <pa***@communit y.nospam> wrote in message
| > | > news:eh******** ******@TK2MSFTN GP09.phx.gbl...
| > | >> Hi all,
| > | >>
| > | >> I have a long web form on asp.net 2.0. When I go at the bottom and
| > click
| > | >> on submit, a postback occurs and if there are any validation errors
| > (no
| > | >> client-side checking being done), the page loads again, but this
time
| > the
| > | >> scroll position is at the bottom. This is annoying, because the
| > actual
| > | >> validation error messages are on the top and the user cannot see
| > them.
| > | >> Any ideas? I have turned off maintainscrollb ackpositiononpo stback
in
| > the
| > | >> pages element in web.config. What am I missing?
| > | >>
| > | >> TIA!
| > | >>
| > | >
| > | >
| > |
| > |
| > |
| >
|
|
|

Nov 19 '05 #7

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

Similar topics

1
3709
by: Boniface Frederic | last post by:
Hello, I have frame displaying the last posted messages. I set <meta http-equiv="refresh" content="5"/> to automatically refresh the frame every 5s My problem is; if I scroll the frame to see messages up or down, after the refresh, the scroll position is reseted to the top of the frame and my scroll position is lost.
2
1810
by: GrantS | last post by:
I am trying to convert the VB.Net code example povided by http://authors.aspalliance.com/JimRoss/Articles/MaintainScrollPos.aspx into C# (ASP.Net)without success. No errors are thrown in the VB code provided on the website. Once I have this example running correctly, I will need to use the concept in a more complex project. The code I am using involves an webform and an htc file. The code for ScrollPos.htc (which is located in a folder...
4
3655
by: ojorus | last post by:
Hi! I just wonder how I can save a page's scroll position with javascript. (i'm not a javascript developer) I have a PHP-page with two columns; the left contains a lot of thumbnails, and the right contain a bigger picture of the thumbnailed selected. The problem is that all these thumbnails (and the big picture) are placed quite far down in the document. (a lot of text is at the top.) What I want is that when a thumbnail is clicked, the...
1
8681
by: JC | last post by:
I'm sure you've all seen the save scroll position from 4 guys from rolla which can be found here > http://aspnet.4guysfromrolla.com/articles/111704-1.aspx BUT try to get that to work AND still be able to set the focus to a control. Here's the problem, when you set the focus by using the registerstartupscript method the control gets the focus after the scroll position has been set. When this happens the scroll position
4
1873
by: Emmanuel | last post by:
Hi, I have placed a DataList control inside a panel control to obtain a scrollable list using the overflow:auto attribute. The rows in the data list contains and edit LinkButton to enable editing of the selected row via postback. My problem is that if i click on the edit button of a row which is not immidiately visible in the scrollable list than i have to scroll down to find the row to be edited. Is there a way to resume the scroll...
7
5619
by: Lit | last post by:
Hi, How can I capture the vertical scroll bar position for a Listbox. I have a Listbox of 100 items + when I click on it I post back remove the item selected. After returning to the client browser the list box scroll position is at the top.
4
10814
by: Stevo | last post by:
I need to lock a DIV in place so that regardless of the scroll position, it remains stuck in a corner. Currently I'm hooked into the scroll events and I'm positioning dynamically based on the scroll amount. So if you scroll down 1000 pixels, then I'm adding 1000 pixels to the position I normally would calculate to fit it in the corner. This works cross browser already, but the responsiveness to the scroll events isn't immediate enough. You...
3
6456
by: bgold12 | last post by:
How can I test if a vertical scroll bar is at the bottom of the range? I know that... document.getElementById('mydiv').scrollHeight ....returns the range, and... document.getElementById('mydiv').scrollTop ....returns the position of the top of the scroll handle in the range,
12
7880
Frinavale
by: Frinavale | last post by:
I think I'm trying to do something impossible. I have a <div> element with a overflow style set to "scroll". In other words my <div> element allows the user to scroll the content within it. There are a number of elements within this <div> that cause the <div> to participate in an Ajax call to the server. In order to maintain the scroll position of the <div> during the Ajax request I store the scroll value in a hidden field so that when...
0
9589
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10211
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...
1
9994
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8872
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7409
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
6673
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
5299
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
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.