In my partial view I have passed some list of strings from a method in controller Here is my partial view
@model IEnumerable<string>
@foreach(var names in Model)
{
<div class="input-block-level">@Html.TextBoxFor(m=>names)</div>
<br/>
}
Here is how it looks in browser
Why am I getting the texts in textbox? I mean I would want them there but as placeholder not default text. How can I not have those values and just have a plane textbox?
Use this to change initial value:
@Html.TextBoxFor(m => names, new { Value = "" })