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.
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 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.
ScrollBar position resets on postback.Is there anyway to maintain position ?I am adding UserControl(s) dynmically to the page, therefore I want to maintian positon (always maintain position at the end)Following is my .aspx file (Just to show where is the asp:panel and User controls)
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.
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.
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?
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.
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 ..
I have four controls in a page with update panel.Initially mouse focus is set to first control.when I partially post back the page to server the focus automatically moves to first control from the last focused control from the control I have tabbed down to.Is there any way to maintain the last focus?
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.
I have implemented the "slimScroll" in a div. Prior to this implementation, I was using the asp.net inherent scrolling and was able to use the Maintain Scroll PositionOnPostback="true" at the Page level and that worked well; but now, this no longer works.
i am using asp.net 4.0 iis 7.5 microsoft visual studio 2010
what i want is keep whole page (browser) scroll position (not a div or panel) when asynchronous postback happened (update panel) how can i do this actually i had a function which can keep div scroll bar position after postback like this
bu i could not find browser scroll bar id to get its values to get with document.getElementById