Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi all,
Am trying to get a <strong> and <br/> in a @Helper but it doesnt to work.
Any suggestion on how to get this??
@Message("Logged in : " + <strong>userName</strong> + userLogin.getProperty("fullName").Value.ToString())
//fuji
Hi Fuji,
In your helper method try accepting an HtmlString instead of a string, or use Html.Raw to output it
Method 1 - change the "string" to "HtmlString"
@helper Message(HtmlString yourMessage)
Method 2 - output the message wrapped in @Html.Raw instead of just the message
@helper Message(string yourMessage) { @Html.Raw(yourMessage)}
HTH,Tom
Hey Tom,
The second method worked well for me.
Thanks
fuji
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Cant get html to work in a @helper
Hi all,
Am trying to get a <strong> and <br/> in a @Helper but it doesnt to work.
Any suggestion on how to get this??
//fuji
Hi Fuji,
In your helper method try accepting an HtmlString instead of a string, or use Html.Raw to output it
Method 1 - change the "string" to "HtmlString"
Method 2 - output the message wrapped in @Html.Raw instead of just the message
HTH,
Tom
Hey Tom,
The second method worked well for me.
Thanks
fuji
is working on a reply...