public async Task<ResultDto<ActionResult>> ImportCustomerLogo(string customerId, IFormFile file) { //var file = Request.Form.Files.FirstOrDefault(); R ...
分类:
其他好文 时间:
2019-11-26 19:16:55
阅读次数:
100
[HttpPost] public ActionResult ExpEleAcc(string linknos) { string filenname = null; CommonResult<string> result = new CommonResult<string>(); try { st ...
分类:
Web程序 时间:
2019-11-19 11:49:45
阅读次数:
94
public ActionResult DownLoadAttachment(string attachmentId) { Attachment attachment = _customerInfoService.GetAttachment(attachmentId); if (attachment ...
分类:
其他好文 时间:
2019-11-04 17:22:48
阅读次数:
50
``` public ActionResult Login(string name, string pwd)//传进来的字符串实际没用上 { //取值 //至少有3种方法能够拿到前台Form表单submit提交过来的数据,必要条件:;;其中name是必要的 //第一种: var nam... ...
分类:
其他好文 时间:
2019-10-16 11:39:23
阅读次数:
110
ASP.NET MVC之文件上传【一】(八) 前言 这一节我们来讲讲在MVC中如何进行文件的上传,我们逐步深入,一起来看看。 Upload File(一) 我们在默认创建的项目中的Home控制器下添加如下: public ActionResult UploadFile() { return View ...
[HttpPost] public ActionResult ImportTaskItem() { if (Request.Files != null) { try { HttpFileCollection files = System.Web.HttpContext.Current.Request ...
分类:
Web程序 时间:
2019-10-11 16:33:44
阅读次数:
87
初来乍到,多多包涵。 EmptypeResult:输出空类容 ContentResult:输出文本内容 return Content("数据"); JsonResult:输出josn数据 return Json(数据, JsonRequestBehavior.AllowGet); JavaScrip ...
分类:
编程语言 时间:
2019-08-27 17:19:03
阅读次数:
146
主页面,就是一个分页的操作 public ActionResult Index(string typename = "", int page=1) { var paging = new Paging(); paging.PageIndex = page; paging.PageSize = 10; ...
分类:
其他好文 时间:
2019-08-20 10:26:43
阅读次数:
71
在ajax的URL中写上"/你的控制器名/你方法名" 在后台控制器中对应有两个常用类型一个是ActionResult还有一个是JsonResult 在访问时需要在类型上加上public 和 特性HttpPost或者HttpGet 这样才可以被前台访问到!如果使用JsonResult传递值给前端的话需 ...
分类:
Web程序 时间:
2019-07-31 00:45:46
阅读次数:
115
一、 ASP.NET MVC 1.0 Result 几何? Action的返回值类型到底有几个?咱们来数数看。 ASP.NET MVC 1.0 目前一共提供了以下十几种Action返回结果类型: 1. ActionResult(base) 2. ContentResult 3. EmptyResul ...
分类:
Web程序 时间:
2019-06-20 00:54:00
阅读次数:
198