摘要: MVC分页源码全面兼容Bootstrapusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Web;namespace System.Web.Mvc{ public static class TKHtml { public static HtmlString Pager(this HtmlHelper htmlHelper, string url, int currentPage, int pageSize, int totalCo... 阅读全文
posted @ 2013-10-03 20:56 痛快 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 动态配置WebC.Config采用Linq string xmlPath = Server.MapPath("/web.config"); XElement rootNode = XElement.Load(xmlPath); var custs = (from c in rootNode.Elements("appSettings").Elements("add") select c).ToList(); foreach (XElement node in ... 阅读全文
posted @ 2013-10-03 12:13 痛快 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 在系统中会看到 Question/123 由来改写路由 public override void RegisterArea(AreaRegistrationContext context) { context.MapRoute( "Question_default", "Question/{id}", new { controller = "Home", action = "Index", id = UrlParameter.Optional } ... 阅读全文
posted @ 2013-10-03 12:11 痛快 阅读(205) 评论(0) 推荐(0) 编辑