i have a question from you guys! i decided to create an HmlHelper with some of HtmlHelrs inside of it and I create this Helper in Razor format, but when compiling the project I got an null reference Error which points to HtmlHelpers that I used inside . so i dont know how can i solve this problem
see this View that i created :
@helper LanguageCheckBoxes(string containerCssClass,string containerSpanCssClass,string checkboxParentCssClass,
string name, string checkboxCssClass, IEnumerable<System.Web.Mvc.SelectListItem> model)
{
<div class="@containerCssClass">
@Html.Label(@BMAIiCGS.Resources.Public.Labels.LanguageList, new { @class = "control-label col-md-3" })
<span class="@containerSpanCssClass">
@foreach (var item in model)
{
<span class="@checkboxParentCssClass">
<input type="checkbox" name="@name" value="@item.Value" checked="@item.Selected" disabled="@item.Disabled" class="@checkboxCssClass" />
@Html.Label(item.Text, new { @class = "control-label" })
</span>
}
</span>
</div>
}
and this is the Error which i cached :
I appreciate someone helps me