码迷,mamicode.com
首页 >  
搜索关键字:actionresult    ( 581个结果
控制器-各种ActionResult
MVC笔记 Controller相关技术 using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using System.Web.Mvc.Ajax; using System.IO; namespace DemoRC.Controlle...
分类:其他好文   时间:2014-09-23 23:04:15    阅读次数:179
Ext 树 绑定本地文件目录
public ActionResult GetTreeData() { DirectoryInfo dir = new DirectoryInfo("d://"); Dir dirList = GetTreeJson(dir);...
分类:其他好文   时间:2014-09-22 20:48:03    阅读次数:207
MVC Controller向View传值(ViewData与ViewBag)
最近在开发项目中,使用的是ASP.NET MVC 由于之前并没有接触,对于它的传值方式有些陌生,在这里进行初步总结积累学习!   一:使用   ViewData使用: public ActionResult Index() { List colors = new List(); colors.Add("red"); colors.Add("green"); colors.Add...
分类:Web程序   时间:2014-09-18 20:44:04    阅读次数:241
常见LINQ语句学习
1.读取20条最新留言public ActionResult Index(){ var mostRecentEntries = (from entry in _db.Entries orderby entry.DateAdded desc...
分类:其他好文   时间:2014-09-16 15:35:10    阅读次数:221
MVC 基本操作
#region 首页 public ActionResult Index() { string User_Test_Select = "User_Test_Select"; var item = DBhelp.G...
分类:Web程序   时间:2014-09-15 15:53:59    阅读次数:231
在ASP.NET MVC使用JavaScriptResult
本例中,我们尝试把javascript程序搬至控制器中去。更好地在控制器编写程序。首先来看看原来的写法。在SepController控制器,添加如下操作: public ActionResult ExerciseA() { return View(); ...
分类:编程语言   时间:2014-09-08 00:58:46    阅读次数:310
asp.net mvc下文件上传
典型的文件上传表单 文件上传操作public ActionResult Index(HttpPostedFileBase file)if (file != null){ string strpath = Server.MapPath("~/files/"+ file.FileName); //获.....
分类:Web程序   时间:2014-09-05 14:11:51    阅读次数:195
Controller返回值类型ActionResult
在mvc中所有的controller类都必须使用"Controller"后缀来命名并且对Action也有一定的要求:必须是一个public方法必须是实例方法没有标志NonActionAttribute特性的(NoAction)不能被重载必须返回ActionResult类型下面列举Asp.net MV...
分类:其他好文   时间:2014-09-04 18:34:59    阅读次数:206
报错: LINQ to Entities 不识别方法“Int32 Parse(System.String)
断点调试发现报错的语句为:public ActionResult SomeMethod(string someId){ var temp = SomeService.LoadEntities(a => a.ID == int.Parse(someId));}原因是:在Lambda表达式内部不能实现数...
分类:其他好文   时间:2014-09-02 17:17:54    阅读次数:369
Web报表-RDLC报表的使用
RDLC报表使用方便,能很好镶嵌在web程序里面,且能方便的导出各种文件的格式;使用此报表程序要引用 Microsoft.Reporting.WebForms;下面以一个例子来进行讲解它的用法。1.后台代码: #region 报表 public ActionResult ReportV...
分类:Web程序   时间:2014-09-02 15:33:34    阅读次数:421
581条   上一页 1 ... 51 52 53 54 55 ... 59 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!