Hey,
I am working on an admin interface that has a radgrid with various filter combos above it. To save the user having to scroll down the page after results load I am using this:
ScriptManager.RegisterStartupScript(Page, GetType(Page), "ScrollScript", "Sys.Application.add_load(function_scrollme() {window.scroll(0,800);});", True)
So this works in that the page scrolls to the bottom when the results load in the radgrid, however, if the user then goes back to the top of the page and does something that causes a postback e.g. they select from a combobox that populates another combo using autopostback (ajax way), then the page still scrolls to the bottom - even though I have an ajaxmanager on the page hooked up to the combo boxes.
It seems that the above code seems to fire for every subsequent postback, even controls updating in an ajax way.
Any idea how I can stop this?
Thanks,
Matt
I am working on an admin interface that has a radgrid with various filter combos above it. To save the user having to scroll down the page after results load I am using this:
ScriptManager.RegisterStartupScript(Page, GetType(Page), "ScrollScript", "Sys.Application.add_load(function_scrollme() {window.scroll(0,800);});", True)
So this works in that the page scrolls to the bottom when the results load in the radgrid, however, if the user then goes back to the top of the page and does something that causes a postback e.g. they select from a combobox that populates another combo using autopostback (ajax way), then the page still scrolls to the bottom - even though I have an ajaxmanager on the page hooked up to the combo boxes.
It seems that the above code seems to fire for every subsequent postback, even controls updating in an ajax way.
Any idea how I can stop this?
Thanks,
Matt