I found the solution between the time I writed this post and the time it was published.
When I hide a panel for show an other one I did :
HtmlInputHidden hiddenScrollTop = (HtmlInputHidden)this.Page.FindControl("ScrollTop");
hiddenScrollTop.Value = "0";
When my page refresh I'm at the top of the page.
For scroll to the bottom of my page, I did :
- In front
<script type="text/javascript">
function pageLoad(sender, args) {
$(document).ready(function () {
window. = getHeight();
function getHeight() {
var body = document.body,
html = document.documentElement;
var height = Math.max(body.scrollHeight, body.offsetHeight,
html.clientHeight, html.scrollHeight, html.offsetHeight);
$("#<%=height.ClientID%>").val(height);
}
});
}
</script>
<asp:HiddenField ID="height" runat="server" />
- In back
HtmlInputHidden hiddenScrollTop = (HtmlInputHidden)this.Page.FindControl("ScrollTop");
hiddenScrollTop.Value = height.Value;