Hi All,
I have a requirement based on word document load in a div along with load separated (Table of contents) in another div. Here Table of contents are binded to Treeview, then we click treeview node the div scroll top. Actual action i want wherever we click treeview node the scroll maintain there position.
please help
What I have tried:
My Code:
<div class="row">
<div class="col-lg-3 sidenav">
<asp:linkbutton id="lbhome" visible="false" runat="server" text="Home" onclick="lbhome_Click">
<asp:treeview id="TVcontents" runat="server" onselectednodechanged="TVcontents_SelectedNodeChanged" font-size="Small">
</div>
<div class="col-lg-9 contentnav">
<asp:label id="marketname" runat="server" font-bold="true" font-size="XX-Large">
<div id="pagecontent" class="pagestyle" style="height: 475px"></div>
</div>
</div>
I tried MaintainScrollPositionOnPostback=true,
I tried
$(function () {
//recover the scroll postion
$("#tvDiv").scrollTop($("#HiddenScrollTop").val());
$("#tvDiv").scrollLeft($("#HiddenScrollLeft").val());
})
$(function () {
//save the scroll position
$("#tvDiv").scroll(function () {
$("#HiddenScrollLeft").val($(this).scrollLeft());
$("#HiddenScrollTop").val($(this).scrollTop());
});
})
and so many but they didn't work