1.在控制器中建立一个PostDemo方法,建立视图创建一个表单

  1 <h2>PostDemo</h2>
  2 name的值:@ViewBag.name
  3 <br />
  4 name2的值:@ViewBag.name2
  5 <form action="/RequestDemo/PostDemo" method="post">
  6     <input type="text" />
  7     <input type="submit" value="提交"/>
  8 </form>
  9 实体方式提交:
 10 <form action="/RequestDemo/PostDemomodel" method="post">
 11     <input type="text"  />
 12     <input type="submit" value="提交" />
 13 </form>
 14 
View Code

相关文章:

  • 2018-10-25
  • 2021-08-29
  • 2021-07-27
  • 2021-08-04
  • 2021-06-09
  • 2022-12-23
  • 2021-06-11
  • 2022-12-23
猜你喜欢
  • 2021-07-15
  • 2022-12-23
  • 2022-12-23
  • 2021-10-18
相关资源
相似解决方案