ActionLink
<%: Html.ActionLink("超级链接的文本","Index","UserInfo",new {name="itcast"},new {demo="ssss"}) %>
//相当于链接到 UserInfo Control下的 Index Action 后面是传递的参数 路径:http://localhost/UserInfo/Index?name=itcast
TextBox
<%: Html.TextBox("UserName","你好传智播客") %>
CheckBox
<%: Html.CheckBox("Foot",true) %>
DropDownList
<%: Html.DropDownList("City") %>
public ActionResult HtmlHelper()
{
ViewData["City"] = new List<SelectListItem>()
{
new SelectListItem(){Selected = false,Text = "北京",Value="1"},
new SelectListItem(){Selected = true,Text = "上海",Value="2"},
new SelectListItem(){Selected = false,Text = "广州",Value="3"}
};
return View();
}
RadioButton
<%=Html.RadioButton("radio","boy",true) %>男
<%=Html.RadioButton("radio","girl",false) %>女