Let's go
上一页 1 ··· 44 45 46 47 48 49 50 51 52 ··· 54 下一页
摘要: 一丶ActionResult 应用于Action方法前面的类型,它是Action的返回值,代表Action的执行结果。 二丶JsonResult 返回Json字符串,但ajax接受到后,会自动转换成Json对象进行使用。 三丶JavaScriptResult 通过后台返给前端js代码。 四丶File 阅读全文
posted @ 2018-07-11 12:40 chenze 阅读(1877) 评论(0) 推荐(0) 编辑
摘要: 一丶追加字符串传值 1 #region 02-追加字符串传值 2 /// <summary> 3 /// 02-追加字符串传值 4 /// </summary> 5 /// <returns></returns> 6 public ActionResult Val() 7 { //生成3个随机数 8 阅读全文
posted @ 2018-07-11 11:56 chenze 阅读(10830) 评论(0) 推荐(0) 编辑
摘要: 若要允许 GET 请求,请将 JsonRequestBehavior 设置为 AllowGet 若要允许 GET 请求,请将 JsonRequestBehavior 设置为 AllowGet 请将 JsonRequestBehavior 设置为 AllowGet MVC 默认 Request 方式为 阅读全文
posted @ 2018-07-11 11:47 chenze 阅读(453) 评论(0) 推荐(0) 编辑
摘要: 过滤器 继承AuthorizeAttribute类,实现 AuthorizationFilter(授权/最先执行),IActionFilter(行为/方法前后),IResultFilter(结果/视图渲染/),IExceptionFilter(异常)接口 public class MyFilter 阅读全文
posted @ 2018-07-11 11:44 chenze 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 一、使用方法 案例: public ActionResult Index() { ViewData["num"] = 2; ViewData.Add("num2", 2); ViewBag.myNum = 2; TempData["myNum2"] = 2; Student stu = new St 阅读全文
posted @ 2018-07-11 11:22 chenze 阅读(162) 评论(0) 推荐(0) 编辑
上一页 1 ··· 44 45 46 47 48 49 50 51 52 ··· 54 下一页
有事您Q我