Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. NavigateURL problem

NavigateURL problem

Scheduled Pinned Locked Moved ASP.NET
questioncsharpvisual-studiodebugginghelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hurrem
    wrote on last edited by
    #1

    Hi, I have a very strange problem. The navigateURL is changing on browser. So, when I debug the value of url i.e. is: E:\Documents\www.txt but in the browser it shows me: file:///E:/Documents/www.txt as you noticed, it changes my backslashes and becouse of that the url is not working. Does anybody know why? and how can I change it? my code is here: protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e) { TreeView1.Nodes[0].Value = @"E:\asem\Visual Studio 2005\WebSites\SDP\users\" + Membership.GetUser().UserName.ToString(); addsubdir(TreeView1.SelectedNode.Value); } void addsubdir(string path) { DirectoryInfo dr = new DirectoryInfo(path); if (dr.Exists) { foreach (DirectoryInfo d in dr.GetDirectories()) { TreeNode t = new TreeNode(); t.Value = d.FullName; t.Text = d.Name; t.NavigateUrl = ""; TreeView1.SelectedNode.ChildNodes.Add(t); } foreach (FileInfo file in dr.GetFiles()) { TreeNode t = new TreeNode(); t.Value = file.FullName; t.Text = file.Name; **string url = file.FullName; t.NavigateUrl = url; //it is changing right here Label1.Text = url;** TreeView1.SelectedNode.ChildNodes.Add(t); } } }

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups