Steven Wells
asked on
apply formatting and styles to MVC view (migration from gridview)
hi,
I am teaching myself a bit of MVC web design. I have a asp.net VB site that I want to try and convert some features to MVC.
I have got my data in a vbhtml page showing, but I need to apply some rules
ie,
convert
@Html.DisplayFor(Function( modelItem) item.FLT_INCIDENT )
to say something like, if item.FLT_INCIDENT value is 2, then display the word Request.
I used to use
when it was in a Grid View.
I don't understand if I should use a helper function or not.
I am teaching myself a bit of MVC web design. I have a asp.net VB site that I want to try and convert some features to MVC.
I have got my data in a vbhtml page showing, but I need to apply some rules
ie,
convert
@Html.DisplayFor(Function(
to say something like, if item.FLT_INCIDENT value is 2, then display the word Request.
I used to use
If e.Row.Cells(2).Text = "2" Then
e.Row.Cells(2).Text = "Request"
RequestImage.Visible = True
Else
e.Row.Cells(2).Text = "Incident"
IncidentImage.Visible = True
End If
when it was in a Grid View.
I don't understand if I should use a helper function or not.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER