Maintaining scroll position after postback (possible problem with AJAX Control Toolkit)
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.
Are you using asp.net 4? If so, there's a Page.SetFocus(Control C)
method that should be what you're looking for
http://msdn.microsoft.com/en-us/library/e04ah0f4.aspx
Note though, that according to the docs
The SetFocus method will work only on browsers supporting ECMAScript version 1.3 or later.
So it probably won't work with older versions of IE
精彩评论