How do I add placeholder text from the model into a MVC view?
来源:互联网 发布:实时监测网速软件 编辑:程序博客网 时间:2024/05/16 18:54
http://stackoverflow.com/questions/22105833/how-do-i-add-placeholder-text-from-the-model-into-a-mvc-view
This solved my issue:
@Html.EditorFor(model => model.Email, new { htmlAttributes = new { @class = "form-control input-sm", placeholder = @Html.DisplayNameFor(m=>m.Email) } })
The code that did it was
placeholder = @Html.DisplayNameFor(m=>m.Email)
0 0
- How do I add placeholder text from the model into a MVC view?
- How do I add a component
- How do I add a library project to the Android Studio?
- How do I convert from BLOB to TEXT in Mysql?
- How do I add a ProgressBar to a .NET StatusBar
- How do I change the FROM address to a friendly name?
- FAQ How do I write to the console from a plug-in?
- How can I insert a checkbox into the header of my view?
- How do I select a random line from a file?
- How do I autosize a button to fit its text
- how to add a member into the PDS using JCL
- How to add a logo into the gerber file?
- How do I use software from a PPA?
- How do I call a C++ function from C?
- In an iOS 5 Storyboard, how do you push a new scene to the original view controller from a Popover?
- In an iOS 5 Storyboard, how do you push a new scene to the original view controller from a Popover?
- How do I load text or csv file data into SQL Server?
- How do I get into graphics?
- 2014华为机试西安地区A组试题
- Shell parameter expansion
- kdump初探
- cgroups
- Email address validation using ASP.NET MVC data type attributes
- How do I add placeholder text from the model into a MVC view?
- Enable Password Resetting with Simple Membership in MVC 4
- Working with Roles in ASP.NET MVC 4+
- linux 实时时钟(RTC)驱动
- No Tipping +回溯+物理+贪心
- Display a view from another controller in ASP.NET MVC
- mini2440驱动分析之LCD
- 纯CSS气泡框实现方法探究
- How to add css class and id in @Html.TextBox mvc4 at the same time