码迷,mamicode.com
首页 >  
搜索关键字:actionresult    ( 581个结果
mvc导出数据到pdf
using iTextSharp;using iTextSharp.text;using iTextSharp.text.pdf;public ActionResult PdfExport(int y = 2014, int m = 1, string departmentcd = "",strin...
分类:Web程序   时间:2015-01-21 14:45:23    阅读次数:243
MVC - 18.缓存
1.使用输出缓存 (不灵活,问题比较多,不建议使用) /// /// datagrid列表 /// /// [OutputCache(Duration = 10)] [HttpPost] public ActionResult MenuItemList() { ...
分类:Web程序   时间:2015-01-16 18:55:22    阅读次数:186
通过文件流stream下载文件
public ActionResult ShowLocalizedXML(int id) { string orderName = ""; string xmlString = GetXmlStream(id,out orde...
分类:其他好文   时间:2015-01-16 18:44:48    阅读次数:100
mvc 伪静态<一> 代码详细
控制器 ( Controller)Product下面功能主要根据多条件搜索产品的列表的功能 public ActionResult ProductList(string cityID, string productType,string currentPageIndex,string sortTyp...
分类:Web程序   时间:2015-01-13 19:37:10    阅读次数:148
在asp.net mvc中上传大文件
在asp.net mvc 页面里上传大文件到服务器端,需要如下步骤:1. 在Control类里添加get 和 post 方法 1 // get method 2 public ActionResult Upload() 3 { 4 ...
分类:Web程序   时间:2015-01-13 01:19:33    阅读次数:173
不能使用控制器“XXXController”的单个实例处理多个请求。如果正在使用自定义控制器工厂,请确保它为每个请求创建该控制器的新实例。
原因:应用@{Html.RenderAction("aaa","XXX");}时路径路由和动作控制器不能是相同的,不然会的错。比如:http://localhost/admin/abc而此public ActionResult XXX(){...return PartialView(models);...
分类:其他好文   时间:2015-01-11 00:54:58    阅读次数:1254
ajax检测账户是否存在
AccountControl.cs private IAccountService _accountService { get; set; } #region 检测账户是否存在 public ActionResult CheckAccountIfExist(...
分类:Web程序   时间:2015-01-09 17:14:49    阅读次数:136
asp.net MVC中form提交和控制器接受form提交过来的数据
1.cshtml页面form提交2.控制器处理表单提交数据4种方式方法1:使用传统的Request请求取值[HttpPost]public ActionResult AddNews(){string a=Request["text1"];string b=Request["text2"];}方法2:...
分类:Web程序   时间:2015-01-09 15:28:46    阅读次数:219
【MVC】关于Action返回结果类型的事儿(上)
一、 ASP.NET MVC 1.0 Result 几何? Action的返回值类型到底有几个?咱们来数数看。 ASP.NET MVC 1.0 目前一共提供了以下十几种Action返回结果类型: 1. ActionResult(base) 2. ContentResult 3. EmptyResul...
分类:Web程序   时间:2015-01-09 00:11:33    阅读次数:182
MVC Controller return 格式
所看到的Action都是return View();我们可以看作这个返回值用于解析一个aspx文件。而它的返回类型是ActionResult如public ActionResult Index(){return View();}除了View()之外那我们这里还能用于返回什么值呢?一、ascx页面场景...
分类:Web程序   时间:2015-01-07 16:22:06    阅读次数:164
581条   上一页 1 ... 44 45 46 47 48 ... 59 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!