I have a TreeView (in UserControl that is placed on SharePoint site) with lots of nodes. After user clicks on any of these nodes PostBack is called and page reloads to the same position (vertically). What I need is to page to be not scrolled to selected node, but stay on its top. I assume that by default TreeView cannot do any scroll action, so it could be SharePoint...
here's my code concerning the issue :
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Load_Tree(); TreeViewDeps.ExpandDepth = 1; }
}
protected void TreeView_OnSelectedNodeChanged(object sender, EventArgs e)
{
Search_TextBox.Text = "";
LoadList(TreeViewDeps.SelectedNode.Value.ToString(), TreeViewDeps.SelectedNode.Text);
}
PostBack
can you show yourPage_Load
code as well as the Selected_Node EventHandler