且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在ASP.NET MVC3 Razor中创建只读文本框

更新时间:2022-12-20 12:01:54

@Html.TextBoxFor(m => m.userCode, new { @readonly="readonly" })

欢迎您为此创建HTML帮助器,但这只是与其他属性一样的HTML属性.您是否会为具有其他属性的文本框创建HTML帮助器?

You are welcome to make an HTML Helper for this, but this is simply just an HTML attribute like any other. Would you make an HTML Helper for a text box that has other attributes?