Last post Nov 29, 2020 12:43 PM by grafic.web
Member
327 Points
1767 Posts
Nov 28, 2020 04:29 PM|grafic.web|LINK
Hi,
i have this link :
<th> @Html.ActionLink(Html.DisplayNameFor(model => model.FirstOrDefault().SalonBookingDate).ToHtmlString(), "Index", new { sortOrder = ViewBag.DateSortParm, currentFilter = ViewBag.CurrentFilter, searchYear = ViewBag.CurrentYear, searchMonth = ViewBag.CurrentMonth, page = Model.PageCount < Model.PageNumber ? 1 : Model.PageNumber }) </th>
and i the web result is this :
Date de réservation
how can i decode html special characters?
Thanks
Contributor
4863 Points
4120 Posts
Nov 28, 2020 08:45 PM|DA924|LINK
If the date data is some kind of valid date data, then why can't you use a ToString("mm/dd/yyyy") to format the date or one of the many other date formatting strings?
3540 Points
905 Posts
Nov 29, 2020 02:52 AM|l.laxmikant|LINK
Try
@Html.Raw(WebUtility.HtmlDecode(someString))
like
@Html.ActionLink(Html.DisplayNameFor(model => @Html.Raw(WebUtility.HtmlDecode(model.FirstOrDefault().SalonBookingDate))).ToHtmlString(), "Index", new { sortOrder = ViewBag.DateSortParm, currentFilter = ViewBag.CurrentFilter, searchYear = ViewBag.CurrentYear, searchMonth = ViewBag.CurrentMonth, page = Model.PageCount < Model.PageNumber ? 1 : Model.PageNumber })
Nov 29, 2020 12:43 PM|grafic.web|LINK
Thanks,
i achived this like this :
@Html.ActionLink(WebUtility.HtmlDecode(Html.DisplayNameFor(model => model.FirstOrDefault().SalonBookingDate).ToHtmlString()), "Index", new { sortOrder = ViewBag.DateSortParm, currentFilter = ViewBag.CurrentFilter, searchYear = ViewBag.CurrentYear, searchMonth = ViewBag.CurrentMonth, page = Model.PageCount < Model.PageNumber ? 1 : Model.PageNumber })
Member
327 Points
1767 Posts
Mvc Html.DisplayNameFor decode special characters
Nov 28, 2020 04:29 PM|grafic.web|LINK
Hi,
i have this link :
and i the web result is this :
Date de réservation
how can i decode html special characters?
Thanks
Contributor
4863 Points
4120 Posts
Re: Mvc Html.DisplayNameFor decode special characters
Nov 28, 2020 08:45 PM|DA924|LINK
If the date data is some kind of valid date data, then why can't you use a ToString("mm/dd/yyyy") to format the date or one of the many other date formatting strings?
Contributor
3540 Points
905 Posts
Re: Mvc Html.DisplayNameFor decode special characters
Nov 29, 2020 02:52 AM|l.laxmikant|LINK
Try
like
Member
327 Points
1767 Posts
Re: Mvc Html.DisplayNameFor decode special characters
Nov 29, 2020 12:43 PM|grafic.web|LINK
Thanks,
i achived this like this :