bootstrap 

<form role="form">
 <div class="form-group">
      <label for="name">名称</label>
      <input type="text" class="form-control" id="name" 
         placeholder="请输入名称">
  </div>
   <button type="submit" class="btn btn-default">提交</button>
</form>

MVC

  @using (Html.BeginForm("Create", "User", FormMethod.Post, new { @class = "form-horizontal" }))
 <div class="form-group">
      <label for="name">名称</label>
        @Html.TextBox("name", "", new { @class = "form-control", placeholder = "请输入账号" })     
  </div>
   <button type="submit" class="btn btn-default">提交</button>
}

 说明:

@using (Html.BeginForm("Create", "User", FormMethod.Post, new { @class = "form-horizontal" }))
Create:执行的Action
User:控制器Controller

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2021-12-21
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案