1.1 Label
Html语法:
Razor语法: @Html.LabelFor(m=>m.UserName)
@Html.Label("第 + (i+ 1) + "页")
1.2 Text
Html语法:
Razor语法: @Html.TextBoxFor(m=>m.UserName)
@Html.TextBox("LinProductId")
1.3 Hidden
Html语法:
Razor语法: @Html.HiddenFor(m=>m.UserName)
@Html.Hidden("Choosed", Convert.ToString(ViewData["Choosed"]))
1.4 Password
Html语法:
Razor语法: @Html.PasswordFor(m=>m.UserPass)
@Html.Password("txtPassword", "", new { @id = "txtPassword" })
1.5 Radio
Html语法: 男
女
Razor语法: @Html.RadioButtonFor(m=>m.sex,0,new {id=“sex0”})男
@Html.RadioButtonFor(m=>m.sex,1,new {id=“sex1”})女
@Html.RadioButton(“noLimitAge”, 0, new {@Name = “limit”, @checked = “checked”, @onclick = “clickNoLimit()”})不限制
@Html.RadioButton(“limitAge”, 1, new {@Name = “limit”, @onclick = “clickLimit()”})限制
1.6 CheckBox
Html语法:
Razor语法: @Html.CheckBoxFor(m => m.IsRemember) 下次自动登录
@Html.CheckBox("checkAll", new { id = "checkAll", onclick = "CheckAll()" })
1.7 DropdownList
Html语法:
Razor语法:
@Html.DropDownList("DDLDepartment", new List
@Html.DropDownListFor(m => m.Man, new List
1.8 Href
Html语法:
123456
Razor语法:
@Html.ActionLink(item.CustomerSerialId, "OrderProcessDetail", "***", new { orderSerialId = item.OrderSerialId, Channel = Request["Channel"] }, new { target = "_blank" })
1.9 Img
Html 语法 :
Razor语法:
1.10 CSS
Html 语法 :
Razor语法:
1.11 JS
Html 语法 :
Razor语法:
---------------------
作者:chenghaibing2008
来源:CSDN
原文:https://blog.csdn.net/chenghaibing2008/article/details/50925122
版权声明:本文为博主原创文章,转载请附上博文链接!