原地址:忘了 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
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
public ActionResult Index() { return View(GetStudetPage()); } [HttpPost] public ActionResult Index(string StuName, DateTime? StuKTime, DateTime? StuJT ...
分类:
其他好文 时间:
2018-07-29 21:15:35
阅读次数:
118
@{ ViewBag.Title = "Index"; Layout = ""; } @**@ @**@ public ActionResult Upload() { NameValueCollection nvc = System.Web.Ht... ...
分类:
Web程序 时间:
2018-07-26 16:22:45
阅读次数:
206
一、Action 1、Action参数: 普通参数、Model类、FormCollection (1)、普通参数 Index(string name,int age) 框架会自动把用户请求的QueryString 或者Post表单中的值根据参数名字映射对应参数的值,适用于查询参数比较少的情况。 (2 ...
分类:
其他好文 时间:
2018-07-26 10:49:34
阅读次数:
145
public ActionResult GetLargeJsonResult() { return new ContentResult { Content = new JavaScriptSerializer { MaxJsonLength = Int32.MaxValue }.Serialize(... ...
分类:
Web程序 时间:
2018-07-24 15:56:15
阅读次数:
193
近在开发项目中,使用的是ASP.NET MVC由于之前并没有接触,对于它的传值方式有些陌生,在这里进行初步总结积累学习! 一:使用 ViewData使用: 在使用上,我们可以很明显的看出这两种方式的区别,只是存取值得方式有些区别而已! public ActionResult Index() { Li ...
分类:
Web程序 时间:
2018-07-20 11:36:27
阅读次数:
169