countrymeister
asked on
how to format a hyperlink in a string in ASP.NET
I have an ASP.NET page which has a label field.
I need to format the label such that I have a message text and the hyperlink
Example
label.text = "You have new orders, that can be viewed at :" + some hyperlink +
If I concat the url it does not show as a hyperlink, I need to dynamically creat a hyperlink
I need to format the label such that I have a message text and the hyperlink
Example
label.text = "You have new orders, that can be viewed at :" + some hyperlink +
If I concat the url it does not show as a hyperlink, I need to dynamically creat a hyperlink
label.text = "You have new orders, that can be viewed at : <a href=\"www.blahblah.com\">SiteName</a>";
label.Text = "can be viewed at : <a href=" + "http://rt.com/" + " >rt.com</a>";
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
label.text = "You have new orders, that can be viewed at : <a href='" + some hyperlink +"' />"
label.text = "You have new orders, that can be viewed at : < a href='" + some hyperlink +"'/>"
To open in Same Page
lbl.Text = "can be viewed at : <a href=" + "http://www.yahoo.com" + " >" + "My Solution" + "</a>";
To Open in new Pop up window use below
lbl.Text = "can be viewed at : <a href=" + "http://www.yahoo.com" + " target=#>" + "My Solution" + "</a>";
lbl.Text = "can be viewed at : <a href=" + "http://www.yahoo.com" + " >" + "My Solution" + "</a>";
To Open in new Pop up window use below
lbl.Text = "can be viewed at : <a href=" + "http://www.yahoo.com" + " target=#>" + "My Solution" + "</a>";
at least give some points to other because other also provide you the detailed answer.