cosmarchy
cosmarchy

Reputation: 686

String Containing Hyperlink

I have a string which has a hyperlink:

string msg = @"Welcome to <a href=\"http://google.com\">Google</a> ";

when I use this in a messagebox, the hyperlink does not show as a link. Is it possible to use a hyperlink in this way?

Upvotes: 1

Views: 7331

Answers (2)

LiverpoolOwen
LiverpoolOwen

Reputation: 816

try removing the ampersand (@)

string msg = "Welcome to <a href=\"http://google.com\">Google</a> ";

Upvotes: 1

I RECOMMEND creating your own dialog easily by creating a new form then dragging a LinkLabel into it, and you can change the LinkLabel properties to redirect you to whatever you want.

Upvotes: 0

Related Questions