public ActionResult IndexTest()
{
String s = Request.Form["testIndex"]; return View();
}
我在V页面有个文本框名为testIndex 为什么我我在这里取不出它的值啊
{
String s = Request.Form["testIndex"]; return View();
}
我在V页面有个文本框名为testIndex 为什么我我在这里取不出它的值啊
解决方案 »
- 怎样修改image字段里面的数据
- 收藏 不显示删除回复显示所有回复显示星级回复显示得分回复 IFRAME加载JS控制的CSS,请问怎么弄?
- 如何将datalist利用<%# DataBinder.Eval(Container.DataItem,"Name")%>值传递到CS代码中重用
- 如何在Table web控件的Cell里添加Button控件?
- div布局
- 发送邮件时,邮件内容为链接就发送不成功,邮件内容为文本可以。
- 如何读取READER的值???
- 第一次来散分
- 怎么让字符串变成一个变量名?
- 怎样得到文本的字节数??(包括中文)
- 导入Excel的问题,大家来看看啊。。
- response.redirect传值问题,急呀!!
{ }
{
var albums = storeDB.Albums
.Include(“Artist”)
.Where(a => a.Title.Contains(q) || q == null)
.Take(10);
return View(albums);
}
Notice how the Searchaction expects to receive a string parameter named q. The MVC framework automatically finds this value in the query string, when the name qis present, and also finds the value in posted form values if you made your search form issue a POST instead of a GET. 摘自Professional ASP.NET MVC 3也就是说如果你的controller方法有入参,MVC framework会自动帮你从get或者post的表单数据中进行匹配,然后把参数传进来。不需要调用request对象的方法