html code in anchor tag text in c# razor
Posted
by
Tripping
on Stack Overflow
See other posts from Stack Overflow
or by Tripping
Published on 2012-11-27T23:02:20Z
Indexed on
2012/11/27
23:04 UTC
Read the original article
Hit count: 227
I am trying to show the rupee sign: ₹ code: ₹ ; in my anchor tag.
I have tried a few things but nothing works ... please help
@{ string _text =
String.Format("{0} {1} {2} {3} {4}",
@Html.DisplayFor(model => model.NoOfBedrooms),
"bedroom flat",
@Html.DisplayFor(model => model.TransactionTypeDescription),
@Html.Raw(₹),
@Html.DisplayFor(model => model.Price));
string _rental = "";
if (Model.TransactionType == 2) { _rental = " per month"; } else { _rental = ""; };
string _linkText = _text + _rental;
}
@Html.ActionLink(_linkText, "Details", "Property", new { id = Model.PropertyId }, null)
© Stack Overflow or respective owner