码迷,mamicode.com
首页 >  
搜索关键字:actionresult    ( 581个结果
Identity角色管理二(显示角色)
需要将目前所有角色名显示出来,方法同用户管理 一、创建Index acction public async Task<ActionResult> Index() { var roles = await _roleManager.Roles.ToListAsync(); return View(rol ...
分类:其他好文   时间:2020-06-30 10:42:47    阅读次数:56
ViewData和ViewBag初学者容易混淆的地方
在做MVC开发时经常会用到ViewData和ViewBag进行传值操作,因为很常用所以在这里总结一下,以方便后来人。一、ViewBag的使用方法 后台代码: public ActionResult Index(){ Dictionary<string, string> address = new D ...
分类:其他好文   时间:2020-06-21 00:52:46    阅读次数:95
与蒙蔽
public ActionResult Photo() { var list = DBHlper.GetList<PengYouQuan>("select * from PengYouQuan"); return View(list); } @model IEnumerable<_6._15Zuoy ...
分类:其他好文   时间:2020-06-16 11:35:56    阅读次数:67
@Ajax.ActionLink跳转页面的问题解决方案 MVC Ajax不支持问题
【JavaScriptResult】在客户端执行服务器返回的JavaScript代码当一个内置的Ajax辅助方法请求一个操作方法,该方法会返回一个在客户端执行立即的脚本。 public ActionResult DoSomething() { string s = "$('#some-div').h ...
分类:Web程序   时间:2020-06-07 19:27:24    阅读次数:72
mvc返回多个结果集,返回多个视图
System.Web.Mvc.ViewPage<dynamic>//这句不清楚到底有没有用,反正我没用到 public ActionResult Index() { IDictionary<string, object> entity = new Dictionary<string, object> ...
分类:Web程序   时间:2020-05-19 15:07:06    阅读次数:78
使用ASP.NET Core 3.x 构建 RESTful API P11 P12 ActionResult of T 以及 AutoMapper.md
使用ASP.NET Core 3.x 构建 RESTful API P11 P12 ActionResult of T 以及 AutoMapperAutoMapper对象映射 IActionResult实际上针对IActionResult接口有一个实现类,ActionResult 所以一般当我们知道... ...
分类:移动开发   时间:2020-04-09 12:37:51    阅读次数:92
P11 ActionResult<T>
大部分的Action方法都有明确的返回类型 这里的返回类型相当于是OK里面套了一个companyDtos的List 争对返回类型比较明确的,实际上IActionResult还有一个实现类ActionResult<T>的形式,这里T就是List<CompanyDto> 也可以改成IEnmerable, ...
分类:其他好文   时间:2020-03-22 01:44:12    阅读次数:85
asp.net MVC中form提交和控制器接受form提交过来的数据
asp.net mvc表单提交的几种方式 MVC中form提交和在控制器中怎样接受1.cshtml页面form提交2.控制器处理表单提交数据4种方式方法1:使用传统的Request请求取值[HttpPost]public ActionResult AddNews(){ string a=Reques ...
分类:Web程序   时间:2020-03-06 10:54:51    阅读次数:77
钉钉调用审批流
原文:钉钉调用审批流 进入钉钉 “钉钉开放平台” 下载SDK https://ding-doc.dingtalk.com/doc#/faquestions/vzbp02 1 public ActionResult Dingding(string sheetno, long dept, string ... ...
分类:其他好文   时间:2020-03-04 14:46:54    阅读次数:121
浅谈ActionResult之FileResult
FileResult是一个基于文件的ActionResult,利用FileResult,我们可以很容易的将某个物理文件的内容响应给客户端,ASP.NET MVC定义了三个具体的FileResult,分别是 FileContentResult、FilePathResult、FileStreamResu ...
分类:其他好文   时间:2020-02-18 16:22:57    阅读次数:64
581条   上一页 1 2 3 4 ... 59 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!