码迷,mamicode.com
首页 >  
搜索关键字:actionresult    ( 581个结果
mvc返回多个结果集,返回多个视图
System.Web.Mvc.ViewPagepublic ActionResult Index(){IDictionary entity = new Dictionary();//声明一个字典健值对List lpc = new List();//实体一List lsp = new List();/...
分类:Web程序   时间:2014-10-29 16:37:04    阅读次数:271
mvc form
当点击提交按钮后,想在Controll里取到Form里的数据。必须在控件上设置name属性 例如,在controll的Action里接收如下 public ActionResult Login(FormCollection form) { string userid=form["userID"]; ...
分类:Web程序   时间:2014-10-28 19:22:06    阅读次数:113
MVC中如何跳过对模型中某个属性的验证
[HttpPost] public ActionResult Create(Users user) { ModelState.Remove(“Password”); //加上这句就行了 if (ModelStat...
分类:Web程序   时间:2014-10-28 15:25:07    阅读次数:166
MVC组件分析(转)
2 System.Web.Mvc V 4.0.0.0 组件分析 2.1 Routing组件(路由选择) Routing的作用就是负责分析Url Action的要求? 必须是一个公有方法? 必须返回ActionResult类型? 必须是实例方法? 不能是范型方法? 没有标注NonActionAttri...
分类:Web程序   时间:2014-10-27 22:47:11    阅读次数:320
再谈Jquery Ajax方法传递到action(转)
之前写过一篇文章Jquery Ajax方法传值到action,本文是对该文的补充。假设 controller中的方法是如下:public ActionResult ReadPerson(PersonModel model) { string s = mod...
分类:Web程序   时间:2014-10-24 18:39:48    阅读次数:307
MVC从客户端中检测到有潜在危险的 Request.QueryString 值
这种问题有两种方案方案一:[ValidateInput(false)] public ActionResult Index() { string ss = Request["rec"]; //客户端输入了res= return View(); }方案二:在WebConfig中配置:...
分类:Web程序   时间:2014-10-21 12:11:10    阅读次数:417
用户邮件找回密码实现
改天我在写详细注释吧,代码先贴出来,注释很明白了,应该无需多言。 1 Controller代码: 2 public ActionResult ForgotPassword() 3 { 4 return View(); 5 } 6 ...
分类:其他好文   时间:2014-10-20 00:45:44    阅读次数:231
ASP.NET MVC 自定义处理JSON ActionResult类
1、统一JSON格式处理方式,同时指定ContentType类型,解决低版本浏览器获取json时ContentType为application/json提示下载的问题. public abstract class CustomResult : ActionResult { pub...
分类:Web程序   时间:2014-10-18 19:35:03    阅读次数:209
【转】ASP.NET MVC学习笔记-Controller的ActionResult
1. 返回ViewResult public ActionResult Index() { ViewData["Message"] = "Welcome to asp.net MVC!"; return View(); } public ActionResult Index(){ ViewData[...
分类:Web程序   时间:2014-10-15 15:59:00    阅读次数:209
MVC3笔记
1 public ActionResult Index(string movieGenre, string searchString) 2 { 3 var GenreLst = new List(); 4 5 var GenreQry = from d in db.Mo...
分类:Web程序   时间:2014-10-13 17:59:19    阅读次数:314
581条   上一页 1 ... 49 50 51 52 53 ... 59 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!