Web Forms :: Page.MaintainScrollPositionOnPostBack Does Not Work?
Aug 20, 2010
I have a content form based on a MasterPage. Within this form I have a custom, collapsible control which inherits from HtmlContainerControl. One of the controls I use is a DropDownList which has AutoPostBack enabled.
I need to maintain the current scroll position across postbacks so I have set the MaintainScrollPostionOnPostBack property to true within the web.config file. Unfortunately, this doesn't seem to work as the position is not maintained and there is no extra javascript present in the code when I view the source.
This content form does also contain some AJAX controls for date selection (CalendarExtender).
View 5 Replies
Similar Messages:
Feb 16, 2010
I have master page and i am using maintainScrollPositionOnPostBack="true"
but it is not working.
View 2 Replies
Jan 31, 2011
I have a page with GridView, one of templates of which is ascx page used like Field Template. This ascx page has a button to add some data to page, but by pressing this button "MaintainScrollPositionOnPostback" not working with main page.
Tried rather much from web, but still no result.
View 1 Replies
Nov 30, 2010
I set the MaintainScrollPositionOnPostback="true" control in the .aspx page code and for one of the pages, it works great. But in the second page, it doesn't work at all. The two pages are nearly identical in code, with just the addition of some more textboxes on the second page, at the bottom of the page. Both pages have virtually identical code above the <html> tag, with the exception of the values assigned to the "CodeFile" and "Inherits" controls in the <Page> tag, to correspond with each page's VB codebehind.
Both pages have two buttons at the bottom. The first page has a button for submitting a new record and a second button for clearing the fields. The second page has a button for updating an existing record and a second button for inserting a new record (for revision control). Both pages submit data to Oracle database tables. I've been trying to figure this out for the last several hours, searching this forum and Google, but so far I've come up with nothing. I can't figure out why the MaintainScrollPositionOnPostback won't work on the second page, but is fine on the first.
View 1 Replies
Dec 15, 2010
I inherited some web shop project (asp.net 3.5, web forms, visual studio 2008 pro). On one page I have MaintainScrollPositionOnPostback set to true. When shopping cart (user control loaded in master page) is empty, then asp.net is not generating javascript code required for scroll position. When I add some items to the cart, then everything works fine.
how to find part of the code which is responsible for this issue? I don't have an access to the 3rd party profilers.
View 1 Replies
Jul 27, 2011
I have a repeater control and everything works great except. . . Every time the form does a post back, which is often, it scrolls to the top (Grrrr). Unfortunately (and apparently) MaintainScrollPositionOnPostback="true" has no affect on the repeater control. I looked on-line and as is customary in .NET there are plenty of "work-around" solutions plenty of which look promising, none of which I could get to work. The most promising solution involved an UpdatePanel and some JavaScript, but that didn't work because it required a second ScriptManager (you can only have one) and I needed the other for my date picker extension. So all I want is the page to stay where it is on callback (I just hate dealing with irate users).Here is the ASP for the repeater:
Code:
<asp:Repeater ID="Repeater1" runat="server" >
<HeaderTemplate>
<table class="formTbl" border="0" cellspacing="2px">
<colgroup>
<col width="75px" />
<col width="75px" />
<col width="50px" />
[code]...
Note: the reason CalculateFootage() is a separate function is because I also call it in the Page_On_Load
View 10 Replies
Mar 15, 2010
I have used a MaintainScrollPositionOnPostBack = true function in 2.0 but is giving a stack overflow at line 0 error. What is the fix to this. I understand that it is a bug in IE.
View 2 Replies
Jun 23, 2010
Does anyone know why MaintainScrollPositionOnPostback="True" works in IE, Firefox, and Opera .. but, not in Chrome or Safari?
View 1 Replies
Dec 17, 2010
I have very simple validation on the aspx page (highlighting not valid textbox), and it works perfectly. But when I try to work with this page using MasterPage, I've got an error - "Object reference not set to an instance of an object." (with reference to the line "aControl.BackColor=Drawing.Color.White" - underlined).
Here is the code of the content page.
<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" CodeFile="testValid.aspx.vb" Inherits="testValid" %>
[Code].....
View 4 Replies
Jun 19, 2012
how a login page works in asp.net ? How IIS participates in this and the server? If i use 3 tier architecture how will it work?
View 1 Replies
Nov 2, 2010
In my ASP.Net web application, I have a base page that implements functionality that spans all pages of the web application and my web pages derive from this base page. Since there is a single master page for the entire website, I don't want to attach the master page in each of the web pages. So I attached the Master page via the basepage's OnPreInit method as follows:
protected override void OnPreInit(EventArgs e)
{
this.MasterPageFile = "~/Site.master";
base.OnPreInit(e);
}
However, when I switch to Designer view, I get the "Master Page Error"; The page has controls that require a Master Page reference, but noe is specified. Correct the problem in Code View.When I run the application, the webpage shows up correctly.What should be done so that the designer shows up correctly without having to go and set the master page explicitly in each of the web pages?
BTW, I am on Visual Studio 2010 and .Net 4.0
View 1 Replies
Mar 16, 2011
I am passing an array from .aspx page to different .cs page. It's not working for me
View 12 Replies
Sep 8, 2010
I am new to .Net and webpart. What I try to do is to create a griedview webpart with a functionality of export to excel. The gridview also can drildown another gridview. The drilldown work as expected. When click export to excel link button it works ok, too. The problem is when comeing back to the gridview to click any row, it stops to drilldown. If I want to use export to excel link it stop working also. Only refresh page can make it work again. I did research and found a solution, that is, to implement a javascript to solve the problem. I follow references from microsoft site as shown below.
View 3 Replies
Feb 4, 2010
I need to save some information about user (some kind of statististics) on post back. But saving takes time and I don't want user to wait for this process. User does't need to know about that saving process.I'm thinking of using ThreadPool or Threads. I want page to be rendered right after I put saving function to the threadPool, not after saving was done.
View 3 Replies
Apr 28, 2010
Here is my structure of master page.
[MasterPage <- Child Page <- Content Page]
1) In MasterPage,i have ContentPageHolder1
2) In Child Page, i add linkbutton into ContentPageHolder1 and create ContentPageHolder2 section
3) In Content Page, select Child Page as master page and try to load the child page link button from page load event but fail
and Checked the current master page name by using [Master.MasterPageFile], it will return MasterPage.
View 4 Replies
Mar 22, 2011
i have a button click event on Content page nad master page have a div(popUp to login).when i fire click event of button it will check weather user is login or not..if he is login user can submit data on button click,but when user is not he will login first(login code is on master page).now after login data will be submit (with out button click v because he is click already)..
View 6 Replies
Feb 23, 2010
I am calling my pages all images from css file like
background-color: #419fbb;
background-image: url(Resources/images/Background.jpg);
background-repeat: no-repeat;
margin: 0pt;
in my project all css files are in Resources/css folder and all images are in Resources/images folder. while runing the project it get background color from css file but don't display background or any image. stablish the correct path to display image.
View 3 Replies
Aug 5, 2010
My page includes a button and a GridView bound to a LINQ data object which is bound to a table. when the page loads the gridview gets populated with the data and all work well. The button has an empty method, when I click the button I get en error message "Intenet explorer cannot display the web page" I put a break point at the begining of the method listed below but I get the error message before it gets there. If I remove the gridview than the button works well.
[Code]....
View 2 Replies
May 6, 2010
I have been browing forums & googling for a couple of hours this morning, trying to find an answer to what (to me) should be a very simple issue. (I am a Delphi programmer moving somewhat reluctantly to Visual Studio C# , for web apps) I have created the simplest ASP.NET website in Visual Studio, containing a Textbox and a Button. When the website loads, I want Textbox1 to have focus. Simply doing
[Code]....
and this too does not work. However, if I press the Enter key when the webpage is displayed, then focus does move to TextBox1 (and pressing Enter again will fire any code attached to Button1). Surely it cannot be this hard to perform something so simple?
View 9 Replies
Sep 24, 2010
i am using wizard control in content page.if i use it in normal aspx it works.but not in content page.i use same code for aspx and content pages
View 1 Replies
Jun 8, 2010
just a quick question -i cant get my class in App_Code to work in my code behind page for simple .net page, some light what doing wrong?
[Code]....
View 7 Replies
Jul 9, 2010
i have my NEWS BAR script code in my home Page which inherits from masterpage like this :
<asp:Content ID="content1" runat="server" ContentPlaceHolderID="mainholder" >
View 8 Replies
May 10, 2010
I have a usercontrol which needs to work slightly differently according to the attributes of its owning page.Is there a way to determine the owning page from within the user control?
View 1 Replies
Oct 16, 2010
i have a page, when the page loads, nothing shows up, when i pass the querystring on the browser as [URL]
I want it to work when the page load not when i pass the querystring on the browser.
Here is the code:
[code]....
[Code]....
[Code]....
View 4 Replies
May 7, 2010
Asp.net gridview dynamic change pagesize not work on the last page.
I have added one dropdownlist in the pager of gridview and add event of selectedIndexChanged with the DropDownList.
Changing pagesize is working except the last page
We can have a look at this link:
http://marss.co.ua/DropDownListInPager.aspx
View 3 Replies