Why is NavigateUrl not redirecting to the page?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sum1
    New Member
    • Jul 2014
    • 1

    Why is NavigateUrl not redirecting to the page?

    Code:
    protected void mytv_SelectedNodeChanged(object sender, EventArgs e)
        {
            TreeView tv = sender as TreeView;
            var nodecheck = tv.SelectedNode;
           
                TreeNode tn = new TreeNode();
                var pname = tv.SelectedNode.Text;
                if (pname == "class4")
                {
                    tn.NavigateUrl = "test.aspx";
                }
            }
    I have my code as above.The navigateurl is doing nothing.Am i missing some thing here?
  • yarbrough40
    Contributor
    • Jun 2009
    • 320

    #2
    I think NavigateUrl is a property. Not a function

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      You are probably looking to use the Response.Redire ct method.

      See the link for documentation on this method and example code.

      -Frinny

      Comment

      Working...