I'm using the JQM-DateBox - which needs the following Razor markup:
@Html.TextBoxFor(m => m.From, new { @name = "mydate", @id = "mydate",
@data_role = "datebox",
@data_options = "{'mode':'flipbox', 'dateFormat':'dd/mm/YYYY' ,'useNewStyle':true} ")
However, this renders as:
<input data-options=" {'mode':'flipbox', 'dateFormat':'dd/mm/YYYY' ,'useNewStyle':true} "
data-role="datebox" id="mydate"
name="From" type="text" value="29/08/2013 00:00:00" />
I know you can use html.raw - but how do you use it within a helper?
I need to show:
{'mode':
...instead of...
{'mode':
Try @Html.Raw(HttpUtility.HtmlDecode(@Html.TextBoxFor(...).ToHtmlString()))
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With