Reputation: 427
This is how i am set my page according my database column:
This is the code (only for the first column)
<table class="table">
<tr>
<th style="font-size: 20px">
@Html.DisplayNameFor(model => model.fileName)
</th>
<th></th>
</tr>
@foreach (var item in Model)
{
<tr>
<td style="font-size: 15px">
@Html.DisplayFor(modelItem => item.fileName)
</td>
<td>
@Html.ActionLink("File Details", "Details", new { id = item.id })
</td>
</tr>
}
</table>
How can i change fileName
to another string when over my html page ?
Upvotes: 0
Views: 37
Reputation: 25725
I don't know if this will work(I am unable to test it at the moment, not on windows),
[Display(Name = "File Name")] //this is the line you must add.
public string fileName{get;set;} //this is your model property name.
This should change it to File Name
Upvotes: 1