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

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?
 
J

Jeffrey Palermo [MCP]

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
 
T

Tom

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"?
 
J

Jeffrey Palermo [MCP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,438
Messages
2,571,699
Members
48,796
Latest member
Greg L.
Top