前端代码 // 引用JS JS调用代码 //JS调用 Html代码//Html代码 Single City (local): 后端数据源 public ActionResult Seach() ...
分类:
Web程序 时间:
2015-04-23 07:02:55
阅读次数:
122
之前由于上线验证需要各种修改配置,需要运维同事处理,太麻烦,今天用程序处理了修改配置文件,一劳永逸,小记下: [HttpPost] public ActionResult SaveSetting(string key, string value) { ...
分类:
其他好文 时间:
2015-04-20 16:40:49
阅读次数:
100
在没有使用异步Action之前,在Action内,比如有如下的写法: public ActionResult Index()
{ CustomerHelper cHelper = new CustomerHelper(); List result = cHelper.GetCustomerData(...
分类:
Web程序 时间:
2015-04-18 09:58:08
阅读次数:
206
CatalogController 方法public ActionResult TopMenu() //categories var customerRolesIds = _workContext.CurrentCustomer.CustomerRoles .Where(cr => cr.Activ...
分类:
其他好文 时间:
2015-04-17 18:05:33
阅读次数:
294
在上一篇介绍MVC中的Ajax实现方法的时候,曾经提到了除了使用Ajax HTML Helper方式来实现之外,Jquery也是实现Ajax的另外一种方案。通过get方法实现AJax请求ViewClick MeControllerpublic ActionResult GetTime(){ r...
分类:
Web程序 时间:
2015-04-09 23:31:47
阅读次数:
160
工厂模式的解读: #region 店铺详情 /// /// Supporters the detail. /// /// public ActionResult ShopDedail() { return View(); } public ActionResult ShopDedailHelp...
分类:
其他好文 时间:
2015-04-08 14:31:01
阅读次数:
116
1.首先在CityController下写DownLoad()方法1 public ActionResult DownLoad()2 {3 /* 这里的 Virtualpath 表示你要设置下载的文件是哪个? 4 项目中 系统总...
分类:
数据库 时间:
2015-04-07 18:58:23
阅读次数:
194
ChildActionOnly的目的主要就是让这个Action不通过直接在地址栏输入地址来访问,而是需要通过RenderAction来调用它。调用子操作public ActionResult Index(){return View();}[ChildActionOnly]public ActionR...
分类:
Web程序 时间:
2015-04-07 11:46:44
阅读次数:
146
今天决定写一篇好一点的文章,吼吼!首先我们必须找到这个文件,这个文件是UsersController.cs,我们找到和添加新用户有关的方法,如下代码: public virtual ActionResult Create() { return V...
分类:
其他好文 时间:
2015-04-06 21:31:06
阅读次数:
256
控制器将处理后的数据“传”给视图的方式 public ActionResult Test() { List stuList = new List() { new Student(){ Age=20, Gender=true, Name="张三1"}, new Stude...
分类:
Web程序 时间:
2015-04-05 11:48:39
阅读次数:
156