VS2005里面新建Web站点时可以从模板创建,默认有一个“Personal Web Site Starter Kit”的模板,是一个人网站程序,根据这个模板可以很容易扩展出自己的个人站点。

其实还有一个模板程序叫“Club Site Starter Kit”,VS2005RTM默认安装时没有带,不过可以从MSDN上下载到:

Club Site Starter Kit   Features  
A starting point for creating a web site for your club or organization. Includes a news posting, calendaring, member directory, and photo album systems.
 
See more about the Club Site Starter Kit:
Try it Live!
Download Starter Kit
(version 50215.45.01, released 4/14/2005)
View Whitepaper (coming soon)
Generic Scripts for SQL Server 2000 and MSDE
Event Calendar Control
View Discussion Forum

News
  • Create announcements and news articles
  • Include a photo, or link to a photo album
Event calendaring
  • Create events for your club
  • View as a list or calendar
  • Download events to Outlook or other calendaring application
Event locations
  • Pages for each location for club events occur at
  • Use for directions and facility information
Photo Albums
  • Create albums and share the photos from your club activities
  • Use the photos in news articles and calendar entries
Membership list
  • View a contact list for the club members
Technologies and Design Approaches Demonstrated:
  • Databound events calendar
  • Customized web controls
  • User controls
  • Data binding

演示地址为:http://beta.asp.net/vwd/live/club/default.aspx
下载地址为:http://asp.net/tools/redir.aspx?path=clubsite 

下载Club.vsi并安装,这样在新建Web站点时就可以选择模板“Club Site Starter Kit”,使用这个模板会默认根据这个模板自动创建一个完整的Club站点程序,您可以在这个基础上进行扩展。

不过要注意一个问题就是这个模板的数据库是在Beta版本时创建的,在RTM下根本就不能正常使用。解决方案就是删除App_Data\clubsite.mdf这个数据库文件,然后重新创建,并下载执行SQL文件(如果要在这个数据库上执行SQL,好像要安装Sql2005):http://www.microsoft.com/downloads/details.aspx?FamilyId=0DD83A11-6980-4951-A192-DA6EACC6A19E&displaylang=en 需要注意的是这个SQL文件创建的数据库据不兼容中文,需要作一下改动,也就是执行SQL前要把SQL中的所有“ COLLATE SQL_Latin1_General_CP1_CI_AS NULL”全部删除。

如果您嫌自己重新创建麻烦,那么也可以在安装完Club.vsi后,下载http://www.CommunityServer.cn/downloads/ClubSiteCS.zip 并覆盖Visual Studio 2005\Templates\ProjectTemplates\Visual Web Developer\CSharp目录下的同名文件。这样以后创建时就不用担心了。

Personal Web Site Starter Kit 和 Club Site Starter Kit 是两个入门级的示例程序,通过学习和研究这两个模板的代码,可以让我们很快的了解学习和使用asp.net2.0。