hi
I have a treeview, and already the javascript code to postback the page. Because when i select the father , auto-select the children.
this is my html code
<script>
function postBackCheckBox()
{
var o = window.event.srcElement;
if (o.tagName == 'INPUT' && o.type == 'checkbox' && o.name != null && o.name.indexOf('CheckBox') > -1)
{
__doPostBack('LinkButton1', '');
}
}
</script>
<asp:UpdatePanel UpdateMode="Conditional" ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:TreeView ID="HierarchicalTreeView" runat="server" OnSelectedNodeChanged="HierarchicalTreeView_SelectedNodeChanged"
ShowLines="True" ExpandImageToolTip="Fechar "{0}"" CollapseImageToolTip="Fechar "{0}""
ExpandDepth="1" OnTreeNodeCheckChanged="HierarchicalTreeView_TreeNodeCheckChanged"
EnableClientScripts="true">
<NodeStyle CssClass="text" />
<SelectedNodeStyle CssClass="text" Font-Bold="true" />
</asp:TreeView>
</ContentTemplate>
</asp:UpdatePanel>
<asp:LinkButton ID="LinkButton1" runat="server" Visible="false"></asp:LinkButton>
and in C#
HierarchicalTreeView.Attributes.Add("onclick", "postBackCheckBox()");
ScriptManager scripManager = (ScriptManager)Page.Master.FindControl("ScriptManagerMaster");
scripManager.RegisterAsyncPostBackControl(LinkButton1);
How can i prevent from postback all page, and only the treeview???, so dont 'refresh' the page