quinta-feira, 15 de março de 2007

Scroll ASP.NET Panel to bottom

Code Behind:
System.Web.UI.ScriptManager.RegisterStartupScript(Panel1, typeof(Panel), "scrollPanel", "scrollPanel();", true);

.aspx page

<script type="text/javascript">
function scrollPanel()
{
var panel = document.getElementById('<%=Panel1.ClientID%>');
panel.scrollTop = (panel.scrollHeight * 2);
}
</script>
you need to change the Panel1.ClientID to your panel.uniqueid.


Nenhum comentário:

Neobux