I am trying to display some rows in a table. Depending on the UserGroup, the View should show different markup. An administrator can delete rows, but a moderator can only ma
You just use else without prepending an @. However, I don't think that is the problem with your page title. Perhaps you need to set the ViewBag.Title property? Your layout page may be depending on it being set.
@if(visible)
{
@Html.TextBoxFor(cn => Model.Row_Number, new { @class = "row required digits", size = 1 })
}
else
{
@Html.TextBoxFor(cn => Model.Row_Number, new { @class = "row required digits", size = 1, disabled = "disabled" })
}
Title issue:
@{
bool visible = Model.Visible;
ViewBag.Title = "My Title;
}