Passing data attribute to TextBoxFor not working

Posted by john G on Stack Overflow See other posts from Stack Overflow or by john G
Published on 2013-11-11T15:15:10Z Indexed on 2013/11/11 15:53 UTC
Read the original article Hit count: 342

I have the following code inside my ASP.NET MVC 4 razor view:

<div>
    <span class="f">Old Tag</span> 
        @Html.TextBoxFor(model => model.olfTag, new { data_autocomplete_source = Url.Action("AutoComplete", "Home") }) 
        @Html.ValidationMessageFor(model => model.olfTag)          
</div>

But data_autocomplete_source with TextBoxFor will not work. Can anyone give me some advice?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about asp.net-mvc