Is there a code snippet showing how to do a Redirect on a TreeView event

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

Sorry... new to this. I trying to figure out how to do a page redirect when
someone clicks a treeview node. Does someone have a code snippet for this?
 
Tom,
Your question is quite short, so I will assume that you are looking for
some .Net code to do this. Check out the Response.Redirect() method. If
you want to do a client redirect, then you can set the treeview node to have
a javascript onclick="location.href={newurl}".

Best regards,
Jeffrey Palermo
 
Sorry if I wasn't clear. What I'm not sure of is how do I detect the node
that was clicked.

For example, given the following tree:

A
a1
a2
B
b1
b2
b3

If "b2" is clicked within the TreeView control, what event do I use to
determine it was b2 and not -- say -- "a1"?
 
Tom,
In v1.1, there is no built-in TreeView control, and I'm not familiar
with the unsupported WebControls from Microsoft for v1.0 (that includes a
TreeView). To answer your question, I would read the documentation for the
control that you are using.

--
Best regards,
Jeffrey Palermo
Blog: http://dotnetjunkies.com/weblog/jpalermo


Tom said:
Sorry if I wasn't clear. What I'm not sure of is how do I detect the node
that was clicked.

For example, given the following tree:

A
a1
a2
B
b1
b2
b3

If "b2" is clicked within the TreeView control, what event do I use to
determine it was b2 and not -- say -- "a1"?


"Jeffrey Palermo [MCP]" <http://dotnetjunkies.com/weblog/jpalermo> wrote in
message news:[email protected]...
Tom,
Your question is quite short, so I will assume that you are looking for
some .Net code to do this. Check out the Response.Redirect() method. If
you want to do a client redirect, then you can set the treeview node to have
a javascript onclick="location.href={newurl}".

Best regards,
Jeffrey Palermo
 
Back
Top