asp.net mvc - How to use HtmlHelper from App_Data to view in MVC3 -
i have create simple htmlhelper class in mvc3 application , set in "app_data\pricehelper.cshtml"
code in pricehelper,cshtml
@helper displayprice(double price) { @string.format("{0:n}",price) }
when tried utilize helper in view @ time not allow me utilize @pricehelper.displayprice().
but if set hepler method on same view work.
please allow me know how can utilize htmlhelper app_data view?
the razor helpers can reused when stored in app_code
folder not app_data
.
you can find more details here: asp.net mvc 3 , @helper syntax within razor
asp.net-mvc asp.net-mvc-3
No comments:
Post a Comment