I´m working on a MVC3 project.
I already have a decimal value into a ViewData["nReceived"] calculated in the controller. After that the controller calls to Index view.
I'm able to display it on Index view outside of a element
<div class="bar bar-success" style="width: 42%;">Received @ViewData["nReceived"]</div>
but I need to use this value as a property of element replacing the width percentage.
I tried this with no success:
<div class="bar bar-success" style="width: @ViewData["nReceived"]%;">Received</div>
and also this:
@ViewContext.Writer
.Write("<div class=\"bar bar-success\" style=\"width: @ViewData["nReceived"]%;">")
Any ideas on how to get it working?