-
Recent Posts
Recent Comments
Mr WordPress on Hello world! zhi on 《Windows用户态程序高效排错》 中涉及到的链接(ZT) Amanda on 歌颂祖国,我们不差钱 Eternal on 歌颂祖国,我们不差钱 Eternal on English Reading:关于中国成为世界第二的真相 Archives
- May 2017
- April 2017
- July 2016
- June 2016
- April 2015
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- August 2005
- July 2005
Categories
Meta
Monthly Archives: October 2009
TheBeerHouse MVC 代码阅读(2)Site Layout
打开Master page Views/Shared/Site.Master,其中引用了/content/styles/site.css和/content/styles/modules.css其中site.css好像是从http://www.layouts4free.com/下载的整体布局为<div id=”header”></div><div id=”page”> <div id=”content”></div> <div id=”siderbar”> <div id=”account”></div> <div id=”admin”></div> <div id=”current-poll”></div> </div></div><div id=”footer”></div> 1. MVC编程对Master的使用 2. 在页面中嵌入控件<% Html.RenderPartial("~/Views/Shared/Poll/PollResultItem.ascx", poll); %>
Posted in Web Development
Leave a comment
TheBeerHouse MVC 代码阅读(3)Navigation System
1.程序的入口在web form编程模式下,每个请求都对应一个URL,每个URL都对应一个aspx文件,每个web site都会有一个default.aspx页面,它是web site的入口。如果用户只输入站点的URL,而不指定页面,IIS会认为用户要访问default.aspx因此对于II6S和VS中的itegrated web server,都是根据用户请求的文件的后缀(.aspx)进行处理,因此需要使用default.asxp把用户请求redirect到defalut route。MVC project template自动生成的default.aspx,在page_load中调用MvcHttpHandler.ProcessRequest处理用户请求,HttpContext.Current.RewritePath(Request.ApplicationPath, false);IHttpHandler httpHandler = new MvcHttpHandler();httpHandler.ProcessRequest(HttpContext.Current); 此时请求的url为"/",对应TheBeerHouse中提供的Route:routes.MapRoute("ArticleIndex", "", new { controller = "Article", action = "Index", category = (string)null, page = 1 }); 2. Routes register MVC要求在Application_Start()中调用 public static void RegisterRoutes(RouteCollection routes)进行注册 … Continue reading
Posted in Web Development
Leave a comment
TheBeerHouse MVC 代码阅读(1)
从功能上看,The Beer House 实现了一般网站常见的功能:News,Article,Blog,Poll,Newsletter,Forums,E-commerce store其实现过程一般为:design database Database Access layerimplement M-C-V 数据库设计成为了最核心的部分。 作者自己推荐的亮点有:http://thebeerhouse.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=33900 使用了Entity Framework,Akimet,Gravatar,SEO(Search Engine Optimization) 实现了Photo Gallery,Calendar of Event, Login anywhere, Social Networking,Akimet 从设计上来看,最基本的元素为 网站布局(site layout) Navigation System Common Behavior Data Access Layer Business Logic Layer 用户管理(Membership and User … Continue reading
Posted in Web Development
Leave a comment
ASP.NET 程序的公用程序的dll必须放到GAC中
有两个Web Application,它们都会用到一个共公的Web Application,比如Launcher 和projectEditor都用到了Login 那么web程序Login所对应的dll就必须放到gac中。对于IIS和ASP.NET而言,看到的只有程序Launcher 和projectEditor,Login只是一个虚拟目录,
Posted in Web Development
Leave a comment