ASP.NET MVC怎么在控制器中得到用户在视图中的输入?
展开全部
表单提交后 在后台的该函数中可以得到如
<form method="post" action = "@url.action("Index","home","")">
<input type = "text" name="uername" id ="uername"/>
<input type = "text" name="pwd" id ="pwd"/>
<input type="submit" value = "提交"/>
</form>
后台 ActionReuslt Index(string username ,string pwd){
var strUser = Username;
var password = pwd;
}
<form method="post" action = "@url.action("Index","home","")">
<input type = "text" name="uername" id ="uername"/>
<input type = "text" name="pwd" id ="pwd"/>
<input type="submit" value = "提交"/>
</form>
后台 ActionReuslt Index(string username ,string pwd){
var strUser = Username;
var password = pwd;
}
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询