2
Answers

How can use anchor Tag title as a url address

Hello Experts, I am facing some little Confusion about the Making SEO Friendly URLS

i am writing

routes.MapPageRoute("-", "-", "~/Jobs/ShowResume.aspx");

in gloabal.asax


foreach (DataListItem item in DataList1.Items)
{
if (item.ItemType == ListItemType.Item || item.ItemType == ListItemType.AlternatingItem)
{
try
{
Label lbldate = (Label)item.FindControl("lbldate");
string idate = lbldate.Text.Replace("/","-");
string date = TimeAgo(Convert.ToDateTime(idate));
lbldate.Text = date;
HyperLink hreflink = (HyperLink)item.FindControl("hreftitle");
hreflink.NavigateUrl = "../-?" + (hreflink.Text).ToString().Trim().Replace(" ", "-");

}
catch (Exception)
{


}

}
}

after doing this my url is coming

like
http://localhost:55389/NXG-Alpha/-?S/w-In-a-Core-IT-Company[^]


but i want

http://localhost:55389/NXG-Alpha/S/w-In-a-Core-IT-Company[^]


it is possible ?

when i call it it says resources is not found ...
Answers (2)