C# - Maintain Scroll Position On Autopostback?

Feb 28, 2011

how can I get back to the same position of a page on postback. It always seems to get to the top of the page
I've tried using ' maintainScrollPositionOnPostBack = "true" ' but its not working.

View 3 Replies


Similar Messages:

Web Forms :: Maintain The Scroll Bar Position?

Apr 7, 2010

i used the dropdown list in user control.when i select the dropdownlist that scroll bar went to top.how can i maintain the scroll bar position in that situation?

View 3 Replies

Maintain Scroll Position On Page?

Jun 7, 2010

I'm using MaintainScrollPositionOnPostback=true property but this doesn't seem to work with chrome. (works on IE),

Is there any other way to maintain scrool position without using this property?

View 1 Replies

Web Forms :: Maintain Scroll Position Of Div In UserControl?

Sep 10, 2010

I have taken a div inside the UserContol.

this usercontrol is placed in a page having master page.

In div i have checkboxlist control .

I want to preserver scroll position of while postback.

I have also used UpdatePanel in which i have placed this user control.

I have also triedMaintainScrollPositionOnPostback="true"

but does not work.

My page structure is this:

Masterpage > contentplacehoder (child Page) > UpdatePanel > User control > div > asp:CheckboxList

View 4 Replies

Web Forms :: Maintain Scroll Position Of Page

Jul 19, 2010

I want to maintain the scroll position of a page. So I try to get the page cordinates and set the position on the page load (actually I've a postback in my page) using JS as follows. What I've done is on a client click on an image get the page cordinates and keep in a hidden field.

[Code]....

GetScollerPosition function invoke in an image click event. But it's not work as I expected, the SetScrollPostion always find the value of hidden fields as zero.

View 8 Replies

Web Forms :: Maintain DIV Scroll Position On PostBack?

Feb 21, 2014

[URL]

I have got the gridview to populate from my own datatable and there are quite a few results in the table. As a result I have a scroll bar on my gridview.

If there is only a few results the gridview works perfectly, however; When I select a row further down in the scroll it selects and highlights but refreshes the view to the top of the gridview.

View 1 Replies

Web Forms :: Maintain Scroll Position On Page Without Postback

Mar 11, 2010

I have some collapse able anhcor link tags on a page that reveal some text when clicked on i.e.: [+] Topic This is all done in javascript client side. I would like to maintain the users scroll position on the page when these links are clicked on. They dont cause a postback as iv mentioned above its client side javascript.

View 6 Replies

Web Forms :: How To Maintain Scroll Position When Redirecting To Same Page

May 7, 2015

I tried out the solution posted for [URL]

Is there any way to maintain scroll position if I need to re-direct to same page?

View 1 Replies

Web Forms :: Maintain Scroll Position While Editing FormView

Feb 25, 2016

I have an asp.net c# web forms application with a formview.  When I click "Edit" on the formview, I have set the focus to a textbox.  This works just fine.  

protected void fv_comp_status_list_DataBound(object sender, EventArgs e) {
if (fv_comp_status_list.CurrentMode == FormViewMode.Edit) {
TextBox tb = (TextBox)fv_comp_status_list.Row.Cells[0].FindControl("pol_numTextBox");
tb.Focus();
} }

The problem is that the textbox is at the bottom of the screen.  I want to set focus on the textbox and also have it move (scroll) to the top of the screen.  This will allow the user to see the entire form, withhout having to scroll initially.  

How can I modify the code to set the textbox (pol_numTextBox) at the top of the page on DataBound once the focus is set?

View 1 Replies

Updatepanel - Maintain Panel Scroll Position On Partial Postback?

Mar 13, 2011

I have a gridview that putted in ASP.NET Panel. both of panel and Gridview are in an UpdatePanel. there is a column in gridview that Causes Partial PostBacks. i want to Maintain Panel Scroll position on those postbacks.

View 1 Replies

Web Forms :: Listbox Auto Postback - How To Maintain Scroll Position

Mar 11, 2010

I have an asp.net listbox with 15 rows and auto postback when the selected item is changed. This works as expected but, when the form is re-loaded, IE scrolls the list so that the last selected item is now the top visible item in the list. This produces a confusing/jumpy effect for the users and makes the listbox more difficult to use than it needs to be.

Is there any way to get the list scroll position to stay as it was before the postback? i.e, if I select an item from the middle of the listbox, the listbox is scrolled to the same point after postback.

I am using .Net 3.5 but no AJAX.

View 6 Replies

Web Forms :: Maintain Scroll Position On Post Back - TabContainer

Aug 5, 2010

I am using usercontrol to populate a web part. The user control consists of ajax tab and in it there is another user control which is a gridview. I add the tabs - My top level usercontrol to the web part. Now when user makes a selection in the gridview (this does a postback) I would like to maintain the scroll position. I tried adding - this.Page.MaintainScrollPositon = true to the page load event of my tabs (priamary) user control. But it does not seem to work. Is there any other way to maintain position in a web part.

View 3 Replies

Maintain Scroll Position After Client-side Validation Fails?

Jun 29, 2010

I've got an ASP.NET webform with asp:TextBox and asp:RequiredFieldValidator at the bottom of the page. If client side validation fails on form submit - the page scrolls all the way up.

I'd like to maintain the scroll position on failed client-side validation.

View 1 Replies

Web Forms :: Maintain Page Scroll Position When Paging In DataList

Jun 10, 2012

I use pagination for my datalist according to this link [URL].....

this is style of pagination

First 1,2,3,4,5 Last

when i run web site i see my datalist with pagination in webpage my datalist is middle of page when i click on page number 2 or 3 to see other page of datalist it reload page and go to top of page i should scroll until I can see my datalist again.

i want when users click on page number after that they see other page of datalist directly not top of page ..

View 1 Replies

Web Forms :: How To Maintain Scroll Position On Postback In Webpage In FireFox And Chrome

Feb 8, 2013

I tried some methods to maintain scroll position on postback but none worked they are

1) In page declaration MaintainScrollPositionOnPostback="true"

2) In Code behind  Page.MaintainScrollPositionOnPostBack = true

3)In web.config file in <system.web>  section <pages maintainScrollPositionOnPostBack="true" />

I am not using any updatepanel.

View 1 Replies

AJAX :: Set The Scroll Position To The Top?

Mar 17, 2011

i have a update panel and when a link button is fired i need to set the scroll position to the top. i need this to happen in the code behind, i have tried the following but it wont work.

ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "srcoll_0", "window.scrollTo(0, 0);", true);

View 3 Replies

Webparts - Maintain Position Of Web Part?

Sep 17, 2010

I have created a web part in asp.net application and allowed user to change it position. Now, I want that once user comes back he/she will see the same setting of web part that he/she had left earlier.What is the best approach to maintain the web part position for that particular user.

View 1 Replies

C# - Maintaining Scroll Position After Postback?

Feb 19, 2011

I have some problems with maintaining scroll position after postback. First time I experienced the problem was when I (believe) added Combobox control from AJAX control Toolkit and/or UpdatePanel from AJAX Extensions. The problem is when I do the postback on the page the page is loaded at the top and not where I did the postback. Actually, this wouldn't be a problem if it isn't happening on a very large form. I have already tried using MaintainScrollPositionOnPostback="true", but it wasn't helpful at all. I can provide the code if needed, but I don't think it would be of any use because I have comboboxes inside update panels which are rebinded on a button click.

View 1 Replies

Maintaining The Scroll Position Inside Tag?

Mar 25, 2011

I have a gridview which is placed inside div tag to make the grid view to look like having scrollbars

<div id="divgrd" style="overflow: scroll"; width: 350px; height: 150px>
My grid is placed here.
</div>

Now it displays nice view of the grid with scroll bars. I am changing the color of the row selected from the grid. Only problem is if the grid has around 50 rows and I select the 50th row then the scroll bar moves to the top of the grid. I want to stop it and maintain the scroll position. I cannot change the height of the div tag as the grid may be very large if the rows inside is increased.

View 3 Replies

How To Remain Scroll Position Of A Panel

Aug 24, 2010

I have a panel, inside a panel there are some checkbox and radiobuttonlist. This panel is place inside an UpdatePanel ajax.

When I click on a checkbox, it will raise autopostback with ajax supported, then the scrollbar of the panel always move back to the first position. It does not keep the current scrolling position.

How could I remain the scrollbar position?

I already have tried to add:

this.Page.SetFocus("PanelTrips");
this.MaintainScrollPositionOnPostBack = true;

View 1 Replies

Listbox Scroll-bar Position Retention?

Jan 8, 2010

how would i get the listbox vertical scroll bar to keep its posisition on postback ?nb I only care about the listbox scroll-bar not page.

View 5 Replies

Web Forms :: Set The Scroll Position Of A ListBox?

Aug 13, 2010

I have found many articles claiming to show you how to set the scroll position of a ListBox, but what they really end up showing you is how to set the SelectedIndex of a ListBox.

Here is what I need: a databound ListBox that's usually going to have around 25 items in it. When the page loads, ALL of the items in the ListBox are selected, and the ListBox is scrolled all the way to the bottom.

I've got the "All items Selected" requirement already, but I can't figure out how to get the "Scroll to the bottom" done.

View 4 Replies

Maintain Screen Position After Post Back

Apr 28, 2010

i find out that whenever there is a post back, the page will post back and go up to the to the top position of the screen. Is it posible for it to maintain the location as it is as before postback??

View 2 Replies

Web Forms :: Scroll Position After Partial Postback?

Feb 1, 2010

I have a page that uses AJAX updatepanels. On this page, we have some radio buttons with Autopostback set to true. The problem is that after the postback, the control was losing focus so that when the user would hit tab, control would be restored to the first control on the page and not the drop-down which fired the event. As a fix, I wrote some set focus code in the radio button's oncheckchanged event. This seems to have fixed the problem with the focus. The problem I have is that the browser loses its scroll position every time I click on one of these radiobuttons. Is there a way to maintain scroll position? Maybe there is another way to resolve my original problem of setting focus that will prevent this from happening.

View 6 Replies

Web Forms :: How To Retain Scroll Position On Postback

Jul 23, 2010

How can we retain Panel scroll position on postback without using any cookies.

View 6 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved