山塞一个PetShop(Task000)——架构(3)
private void BindCategories() {
Category category = new Category();
repCategories.DataSource = category.GetCategories();
repCategories.DataBind();
}
}
}
9、在Default.aspx中,拖入用户控件NavigationControl.ascx
      
  
10、复制连接字符串
[html]
<connectionStrings> 
  <add name="SQLProfileConnString" connectionString="server=(local)\sqlexpress;database=MSPetShop4Profile;integrated security=SSPI;min pool size=4;max pool size=4;" providerName="System.Data.SqlClient" /> 
  <add name="SQLMembershipConnString" connectionString="server=(local)\sqlexpress;database=MSPetShop4Services;integrated security=SSPI;min pool size=4;max pool size=4;" providerName="System.Data.SqlClient" /> 
  <add name="SQLConnString1" connectionString="server=(local)\sqlexpress;database=MSPetShop4;integrated security=SSPI;min pool size=4;max pool size=4;" providerName="System.Data.SqlClient" /> 
  <add name="SQLConnString2" connectionString="server=(local)\sqlexpress;database=MSPetShop4;integrated security=SSPI;max pool size=4;min pool size=4;" providerName="System.Data.SqlClient" /> 
  <add name="SQLConnString3" connectionString="server=(local)\sqlexpress;database=MSPetShop4Orders;integrated security=SSPI;min pool size=4;max pool size=4;" providerName="System.Data.SqlClient" /> 
</connectionStrings> 
 
11、复制
[html]
<appSettings> 
  <!-- Pet Shop DAL configuration settings. Possible values: PetShop.SQLServerDAL for SqlServer, PetShop.OracleServerDALfor Oracle. --> 
  <add key="WebDAL" value="NetShop.SQLServerDAL"/> 
  <add key="OrdersDAL" value="NetShop.SQLServerDAL"/> 
</appSettings> 
12、右击“Default.aspx“→“在浏览器中查看”

摘自 ASP.NET技术
相关新闻>>
- 发表评论
- 
				
- 最新评论 进入详细评论页>>



