[索引页]
[源码下载]
作者:webabcd
介绍
·Multi Targeting(多定向):发人员就可以明确地指定.NET Framework 2.0或者3.0或者3.5版本,VS会自动地过滤Intellisense、工具箱控件、模板等诸如此类的东西
·Web Designer and CSS(集成了CSS的web设计器):增加了“拆分”设计视图,增加了“管理样式”、“应用样式”和“CSS属性”,“视图”菜单中增加了“标尺和网格”、“可视辅助”和“格式标记”
·Nested Master Page(嵌套母版页):支持母版页的多层嵌套
示例
MultiTargeting.aspx(解释“多定向”)
<%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="MultiTargeting.aspx.cs"
Inherits="Feature_MultiTargeting" Title="Multi Targeting(多定向)" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<div style="text-indent: 24px; 600px">
VS 2008允许开发人员针对多个.NET Framework版本开发。 新建项目的时候可以在弹出的“新建项目”对话框的右上角选择目标框架。 这样,开发人员就可以明确地指定.NET
Framework 2.0或者3.0或者3.5版本,VS会自动地过滤Intellisense、工具箱控件、模板等诸如此类的东西。之所以能实现此功能,是因为.NET 3.0和3.5实际上只是构建于CLR
2.0上的类库。
</div>
</asp:Content>
Feature.css(为了演示“集成了CSS的web设计器”而写的CSS)
.cssBox
{
font-size: 14px;
background-color: #99CCFF;
padding: 20px;
}
.cssTitle
{
font-size: 18px;
background-color: #FFFFCC;
}
.cssList
{
list-style: none;
margin: 0px;
width: 350px;
background-color: #CCC;
}
.cssList li
{
float: left;
width: 100px;
line-height: 30px;
padding: 5px;
}
CSS.aspx(演示“集成了CSS的web设计器”)
<%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="CSS.aspx.cs"
Inherits="Feature_CSS" Title="Web Designer and CSS(集成了CSS的web设计器)" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
<link href="../CSS/Feature.css" rel="stylesheet" type="text/css" />
<style type="text/css">
ul
{
background-color: Red;
margin: 500px;
width: 5000px;
}
ul.cssExplain
{
background-color: White;
margin: 0px;
width: 600px;
text-indent: 24px;
}
ul.cssExplain li
{
line-height: 20px;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<div class="cssBox">
<h3 class="cssTitle">
Web Designer and CSS(集成了CSS的web设计器)</h3>
<ul class="cssList">
<li>abc</li>
<li>abc</li>
<li>abc</li>
<li>abc</li>
<li>abc</li>
<li>abc</li>
</ul>
</div>
<div>
</div>
<div>
<ul class="cssExplain">
<li>有3个设计视图,分别是“设计”、“拆分”和“源”。“拆分”是新增的一个设计视图,它可以将“设计”和“源”同时显示,并且支持设计上的同步 </li>
<li>管理样式:可新建CSS或附加一个已有的CSS;列出页内的CSS和被页附加的CSS,并且可以预览CSS;红色 - 元素ID,绿色 - 类,蓝色 - 元素</li>
<li>应用样式:列出可应用的CSS(有预览效果),单击相应的规则后,则在你选中之处或你光标所在之处应用相应的CSS</li>
<li>CSS属性:列出当前选中之处或当前光标所在之处被应用的CSS;蓝色 - 当前CSS规则的属性,蓝色加红色删除线 - 被覆盖的父级CSS规则的属性;单击“摘要”则列出当前CSS规则所使用的属性</li>
<li>“视图”菜单中增加了“标尺和网格”、“可视辅助”和“格式标记”</li>
</ul>
</div>
</asp:Content>
NestedMasterPage.master(嵌套母版页)
<%@ Master Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="NestedMasterPage.master.cs"
Inherits="Feature_NestedMasterPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<p>
我是一个嵌套母版页(注:“ContentPlaceHolder”控件可以从工具箱中拖拽进来)(支持母版页的多层嵌套)
</p>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</asp:Content>
NestedMasterPage.aspx(使用了嵌套母版页的内容页)
<%@ Page Language="C#" MasterPageFile="~/Feature/NestedMasterPage.master" AutoEventWireup="true"
CodeFile="NestedMasterPage.aspx.cs" Inherits="Feature_NestedMasterPage" Title="Nested Master Page(嵌套母版页)" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<p>
我是内容页,使用了嵌套母版页
</p>
</asp:Content>
OK
[源码下载]
[源码下载]
步步为营VS 2008 + .NET 3.5(1) - VS 2008新特性之Multi Targeting(多定向)、Web Designer and CSS(集成了CSS的web设计器)和Nested Master Page(嵌套母版页)
作者:webabcd
介绍
·Multi Targeting(多定向):发人员就可以明确地指定.NET Framework 2.0或者3.0或者3.5版本,VS会自动地过滤Intellisense、工具箱控件、模板等诸如此类的东西
·Web Designer and CSS(集成了CSS的web设计器):增加了“拆分”设计视图,增加了“管理样式”、“应用样式”和“CSS属性”,“视图”菜单中增加了“标尺和网格”、“可视辅助”和“格式标记”
·Nested Master Page(嵌套母版页):支持母版页的多层嵌套
示例
MultiTargeting.aspx(解释“多定向”)













Feature.css(为了演示“集成了CSS的web设计器”而写的CSS)


























CSS.aspx(演示“集成了CSS的web设计器”)



















































NestedMasterPage.master(嵌套母版页)













NestedMasterPage.aspx(使用了嵌套母版页的内容页)









OK
[源码下载]