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

Discussion in 'ASP .Net' started by Tom, Nov 24, 2004.

  1. Tom

    Tom Guest

    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, Nov 24, 2004
    #1
    1. Advertising

  2. 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

    "Tom" <> wrote in message
    news:...
    > 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?
    >
    >
    Jeffrey Palermo [MCP], Nov 24, 2004
    #2
    1. Advertising

  3. Tom

    Tom Guest

    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:...
    > 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
    >
    > "Tom" <> wrote in message
    > news:...
    > > 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, Nov 30, 2004
    #3
  4. 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" <> wrote in message
    news:%...
    > 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:...
    > > 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
    > >
    > > "Tom" <> wrote in message
    > > news:...
    > > > 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?
    > > >
    > > >

    > >
    > >

    >
    >
    Jeffrey Palermo [MCP], Dec 1, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Clare Hsiao
    Replies:
    0
    Views:
    327
    Clare Hsiao
    Feb 12, 2004
  2. Edwin Knoppert
    Replies:
    0
    Views:
    370
    Edwin Knoppert
    Nov 30, 2005
  3. Ray Booysen
    Replies:
    2
    Views:
    645
    Ray Booysen
    Mar 28, 2006
  4. Sal
    Replies:
    1
    Views:
    409
  5. python
    Replies:
    6
    Views:
    266
Loading...

Share This Page