471,059 Members | 1,459 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,059 software developers and data experts.

TreeView Postback

I have a treeview setup on my page. In case it is relevant, it is set in an
accordion, which is inside an update panel. When I click the treeview node, a
page loads on the right side of my browser as it should. When I click the
same node, the right side of my browser goes blank. I do not want it to go
blank if the user clicks the same node. I would like it to not change. At
this point, I do not know how it is happening. Is there a property I can set
to keep this from happening? Can someone explain this to me? Thank you.

Below is the markup and the event that is run on first click:
<asp:UpdatePanel ID="upMain" runat="server">
<ajaxToolkit:Accordion ID="AccordionHome" runat="server"
ContentCssClass="accordionContent" FadeTransitions="true"
FramesPerSecond="40" HeaderCssClass="accordionHeader"
RequireOpenedPane="false" SelectedIndex="9" SuppressHeaderPostbacks="true"
TransitionDuration="40" Width="275px" AutoSize="None">
<ajaxToolkit:AccordionPane ID="apAccountSetup" runat="server"
ToolTip="Click to Expand / Collapse">
<a class="accordionLink" href=""> 1A Account Setup</a>
<asp:ImageButton ID="btnNoteClient" runat="server"
ImageUrl="Images/Accordion/notes.gif" ImageAlign="Right"
CausesValidation="False" CommandName="Note" CommandArgument="Client"
ToolTip="Development Notes" OnClick="btnNoteClient_Click" />
<asp:TreeView ID="tvAccountSetup" runat="server"
SelectedNodeStyle-BackColor="Yellow" Font-Size="10pt" Font-Bold="True"
OnSelectedNodeChanged="tvAccountSetup_SelectedNode Changed">
<asp:TreeNode Value="Insights" Text="Insights"
ImageUrl="Images/Accordion/lightbulb.gif" />
<asp:TreeNode Value="ClientProfile" Text="Airline Profile"
ImageUrl="Images/Accordion/icon_left.gif" />
<asp:TreeNode Value="ClientBase" Text="Primary Program Currency"
ImageUrl="Images/Accordion/icon_left.gif" />
<asp:TreeNode Value="Help" Text="Help"
ImageUrl="Images/Accordion/qmark.gif" />
protected void tvAccountSetup_SelectedNodeChanged(object sender, EventArgs e)
//In case the page cannot be found, with this code in a try catch, it will
not error.

//Return the ID of the treeview. This will correspond to
//the folder the user control is located under.
//all tree views on the default page use the same two-
//character prefix naming convention.
Control c = Page.LoadControl(@"UserControls\" +
tvAccountSetup.ID.Substring(2) + @"\" + tvAccountSetup.SelectedValue +

Jun 27 '08 #1
0 1543

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by xzzy | last post: by
9 posts views Thread by Martin Randall | last post: by
1 post views Thread by kvicky | last post: by
8 posts views Thread by Matt MacDonald | last post: by
26 posts views Thread by JJ | last post: by
reply views Thread by Joe Stateson | last post: by
1 post views Thread by =?Utf-8?B?Rmx5Z3V5?= | last post: by
2 posts views Thread by =?Utf-8?B?QW1pciBUb2hpZGk=?= | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.