Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 169
  • Last Modified:

Why are these special characters showing up?

This code:
string anchor = "<a href=\"~/" + t.TableName + "/Edit.aspx\">" + t.TableName + "</a>";

http://localhost:2614/Pages/z_old_product/Edit.aspx

because the page where I am posing the link is in the Pages folder.

I want to remove Pages. But z_old_product is not a folder, otherwise I think I could use:

"~/z_old_product/Edit.aspx"

Please let me know...

Thanks,
newebieweb
0
newbieweb
Asked:
newbieweb
  • 2
  • 2
2 Solutions
 
starlite551Commented:
Move /z_old_product/ folder outside the Pages folder and then try the code :
"~/z_old_product/Edit.aspx"

Thats is copy and paste the "~/z_old_product/" Folder itself outside Pages folder..
0
 
newbiewebAuthor Commented:
Is there no other way? I like the Pages folder, but z_old_product is a database table. This is a Dynamic Data website...
0
 
starlite551Commented:
Try this code then :
string anchor = @"<a href=\"~/Pages/" + t.TableName + "/Edit.aspx\">" + t.TableName + "</a>";

Open in new window

0
 
newbiewebAuthor Commented:
Thanks.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now