使用@Html.TextBoxFor(m => Model.UserName, new { @class = "inputCell2", size = "10" })在視圖頁中生成的html代碼中有.net自設(shè)的name屬性<input class="inputCell2" id="UserName" name="Entity.UserName" size="10" type="text" value="" />我想改成:<input class="inputCell2" id="UserName" name="user" size="10" type="text" value="" />試用@Html.TextBoxFor(m => Model.UserName, new { @class = "inputCell2", size = "10", @name = "user" })卻沒反應(yīng)請大家?guī)兔鉀Q一下,謝謝,急啊
2 回答

慕桂英3389331
TA貢獻2036條經(jīng)驗 獲得超8個贊
@Html.TextBox("user", @Model.UserName, new { @class = "inputCell2", size = "10" })
- 2 回答
- 0 關(guān)注
- 395 瀏覽
添加回答
舉報
0/150
提交
取消