CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 7/24/2007 2:12:45 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 218 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
4 Items, 1 Pages 1 |< << Go >> >|
softbreeze
Asp.Net User
using MaintainScrollPositionOnPostBack with MasterPage7/24/2007 2:12:45 PM

0/0

I have a set of webpages that all share the same masterpage. One of these pages has an AJAX update panel with a timer that is set for 3 seconds. In this update panel I have a GridView that displays a list of hosts and one of the columns is a status that changes frequently. So every three second I refresh the page. It works great except for one thing, if the page has been scrolled down and the timer fires, the page is refreshed and the scroll position is not saved. This is ture even if no change is made to the data. 

I am using MaintainScrollPositionOnPostBack="true" on the the content page. Is it possible to prevent the master page from refreshing and repositioning itself to the top? It doesn't appear that you can add the MaintainScrollPositionOnPostBack to a masterpage.

Thanks

sanraj84
Asp.Net User
Re: using MaintainScrollPositionOnPostBack with MasterPage7/24/2007 2:55:47 PM

0/0

softbreeze
Asp.Net User
Re: using MaintainScrollPositionOnPostBack with MasterPage7/24/2007 4:58:59 PM

0/0

Thank you. I had already seen this article but dismissed it since it was for .net 1.x and I'm using .net 2.0.

The MaintainScrollPositionOnPostBack works just fine in .Net 2.0. The problem I'm having is that if the webpage is a content page of a masterpage and you have scrolled the browser such that the masterpage is scrolled, then any updates to the AJAX Update Panel that exists in the contaent page causes the master page to be repositioned rather that maintain the browser scroll position.  BTW the gridview that I have does not have any scrolling associated with it so rather than scrolling the gridview I am scrolling the entire web page.

Ken

Amanda Wang - M
Asp.Net User
Re: using MaintainScrollPositionOnPostBack with MasterPage7/27/2007 8:10:32 AM

0/0

Hi,

You can't do that in a Master page, because master page is due to the fact that the master page is not a "page" but a user control and is treated like one inside the Page. So no use having that property as it would only work for a actual pages.

But you can set it for one single page in the head secion, or all pages in the Web.Config file in the Pages Element.

 

Hope it helps.

 


Please remember to mark the replies as answers if they help and unmark them if they provide no help.


Yours sincerely,
Amanda Wang
Microsoft Online Community Support
4 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Programming ASP.NET: Building Web Applications and Services with ASP.NET 2.0 Authors: Jesse Liberty, Dan Hurwitz, Pages: 930, Published: 2005
ASP. NET V. 2. 0-the Beta Version: The Beta Version Authors: Alex Homer, Dave Sussman, Rob Howard, Pages: 620, Published: 2004
Learning ASP.NET 3.5 Authors: Jesse Liberty, Dan Hurwitz, Brian MacDonald, Pages: 576, Published: 2008

Web:
using MaintainScrollPositionOnPostBack with MasterPage - ASP.NET ... I am using MaintainScrollPositionOnPostBack="true" on the the content page. Is it possible to prevent the master page from refreshing and ...
MaintainScrollPositionOnPostback not working on aspx with ... I have a master page with 2 content place holders (one for the ... the page directive I'm using the MaintainScrollPositionOnPostback option ...
ASP.NET 2.0 SmartNavigation vs MaintainScrollPositionOnPostback? I am using a masterpage for header/footer stuff. In my content page I am using MaintainScrollPositionOnPostback, and ...
MaintainScrollPositionOnPostback not working ... ... so in my content pages (as I'm using a .master file for the main layout) I' ve set... ... Master.Page.MaintainScrollPositionOnPostback = true ...
Reference A var on Master Page from User Control MaintainScrollPositionOnPostback="true" AutoEventWireup="false" .... Thanks for the reply, I tried using Dim ms as MasterPage = CType(Me. ...
How remember page position on postback in ASP.net It does. There are additional considerations when using MaintainScrollPositionOnPostback with MasterPages - discussed here: ...
Maintain Position on Long .aspx Pages I also tried to add SmartNavigation to a Master Page. Big failure. Then I tried to add MaintainScrollPositionOnPostback to a Master Page. No Go! ...
MaintainScrollPosition in masterpage + ajax - .NET ASP Oct 18, 2007 ... The tree jump back to the top. Because I'm inside a masterpage I don't have the "maintainScrollPositionOnPostBack". ...
setting maintainScrollPositionOnPostBack = true curropts the file ... this works fine across all pages, but using this has induced a new problem. ...
ASP.Net Tips & Tricks Apr 22, 2007 ... does not have any master page. For example, <%@ Page Language="VB" MaintainScrollPositionOnPostback="true" %> will raise an error. ...




Search This Site:










asp.net page element unit testing

authorization for a subfolder

add records to database with microsoft visual web developer

remove childnode from a treeview control

module communicator for dummies?

dotnetnuke and classified starter kit

portal admin has lost all rights...need help asap please

convert php/mysql with pear, smarty to asp.net (c#)

dnn search/indexer

unique user authorization / student record tracking system

composite control viewstate problem

sitemap error when clicked and page load

formauthentication cookies vs session old style

module setting, text color problem

rewrite module version 1.01 for dnn 3.0.12

why need ca?..

how to | vertical menu

forms authentication mode causes endless loop

problems upgrading from 2.0.4 to 2.1.2

internet explorer web controls are not currently supported by microsoft ???

can not create another portal!!

install to root or subfolder

registerhiddenfield within master page

dot net nuke 3.1.0 installation problems still!

3.0.6 issue - generate language pack

how to use new locale?

custom profile provider

selecting multiple controls w/ ctrl + click

windows authentication - could not load type 'dotnetnuke.cdefault'

vb class and application/session/server variables

 
All Times Are GMT