码迷,mamicode.com
首页 >  
搜索关键字:actionresult    ( 581个结果
反射获取所有视图
原地址:忘了 controller 的 action 加上属性 [System.ComponentModel.Description("菜单列表")] 且 返回值为 System.Web.Mvc.ActionResult 类型,就可以获取到了 [System.ComponentModel.Descr ...
分类:其他好文   时间:2018-08-13 12:18:13    阅读次数:155
控制器里面的
public ActionResult Index() { return View(); } public string SaveFile() { if (Request.Files.Count > 0) { Request.Files[0].SaveAs(Server.MapPath("~/App ...
分类:其他好文   时间:2018-08-07 21:28:17    阅读次数:150
asp.net mvc各种传值方式大全
MVC 各种传值方式 ViewData传值. HomeController.cs Co de: public ActionResult Index(){ ViewData["Title" ] = "Home Page" ; ViewData["Message" ] = "Welcome to ASP ...
分类:Web程序   时间:2018-08-02 16:09:35    阅读次数:226
反填控制器
public ActionResult UPD(int id) { ViewBag.StuCLassID = new SelectList(bl.Listselect(), "CLASSID", "CLASSNAME"); return View(bl.UPDA(id)); } ...
分类:其他好文   时间:2018-07-30 11:36:56    阅读次数:105
控制器内分页和显示
public ActionResult Index() { return View(GetStudetPage()); } [HttpPost] public ActionResult Index(string StuName, DateTime? StuKTime, DateTime? StuJT ...
分类:其他好文   时间:2018-07-29 22:17:39    阅读次数:134
PagePrams
public ActionResult Index() { return View(GetStudetPage()); } [HttpPost] public ActionResult Index(string StuName, DateTime? StuKTime, DateTime? StuJT ...
分类:其他好文   时间:2018-07-29 21:15:35    阅读次数:118
使用jquery插件ajaxfileupload一次上传多个文件,示例
@{ ViewBag.Title = "Index"; Layout = ""; } @**@ @**@ public ActionResult Upload() { NameValueCollection nvc = System.Web.Ht... ...
分类:Web程序   时间:2018-07-26 16:22:45    阅读次数:206
Action参数和ActionResult
一、Action 1、Action参数: 普通参数、Model类、FormCollection (1)、普通参数 Index(string name,int age) 框架会自动把用户请求的QueryString 或者Post表单中的值根据参数名字映射对应参数的值,适用于查询参数比较少的情况。 (2 ...
分类:其他好文   时间:2018-07-26 10:49:34    阅读次数:145
mvc大对象json传输报错
public ActionResult GetLargeJsonResult() { return new ContentResult { Content = new JavaScriptSerializer { MaxJsonLength = Int32.MaxValue }.Serialize(... ...
分类:Web程序   时间:2018-07-24 15:56:15    阅读次数:193
MVC Controller向View传值(ViewData与ViewBag)
近在开发项目中,使用的是ASP.NET MVC由于之前并没有接触,对于它的传值方式有些陌生,在这里进行初步总结积累学习! 一:使用 ViewData使用: 在使用上,我们可以很明显的看出这两种方式的区别,只是存取值得方式有些区别而已! public ActionResult Index() { Li ...
分类:Web程序   时间:2018-07-20 11:36:27    阅读次数:169
581条   上一页 1 ... 5 6 7 8 9 ... 59 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!