I want to remove if-statements from my View, but I'm having problems with predefined controls like Html.DropDownList.
For example, I have an DropDownList that in some case contains empty selection (or in other words.. possibility to Not select something) and other case is that there is no empty selection.
<% if (Model.IsCreateEmptySelectionSet)
{ %>
<%= Html.DropDownList("InternalVariableTypeList", Model.InternalType, "-- select internal variable type --")%>
<% } %>
<% else
{ %>
<%= Html.DropDownList("InternalVariableTypeList", Model.InternalType)%>
<% } %>
So, I would like create helper that would create correct DropDownList, but when I create my own helper I can't access Html.DropDownList. How is it used in correct way?