Rank: Advanced Member
Groups: Authorized User, Developers Joined: 2/17/2019(UTC) Posts: 909
Thanks: 3 times Was thanked: 15 time(s) in 15 post(s)
|
Trying to get my feet wet with some basic razor code in a veiw, please see the code segment below which is working.
@if (Model.OrderLocked) { var sOrderText = " - This order is LOCKED!"; ViewBag.Title = "View Order"; ViewBag.PageCaption = "View Order #" + Model.OrderNumber + sOrderText; } else { ViewBag.Title = "View Order"; ViewBag.PageCaption = "View Order #" + Model.OrderNumber ; }
I would like to format the var sOrderText to display in bold. Having lots of problems. Probably has something to do with @Html.Raw, but I missing something. Pulling out my hair all night.
Thanks
|
|
|
|
Rank: Advanced Member
Groups: Authorized User, Developers Joined: 2/17/2019(UTC) Posts: 909
Thanks: 3 times Was thanked: 15 time(s) in 15 post(s)
|
Got it!
ViewBag.PageCaption = Html.Raw("View Order #" + Model.OrderNumber + "<b>" + sOrderText + "</b>") ;
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The AbleCommerce Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close