首页 新闻 搜索 专区 学院

petshop4的若干问题!!

0
悬赏园豆:5 [已关闭问题]
<P>petshop4 重写了 profile&nbsp;</P> <P>&nbsp;public sealed class PetShopProfileProvider : ProfileProvider </P> <P>{//实现</P> <P>}</P> <P>然后在web.config 这样</P> <P>&lt;profile automaticSaveEnabled="false" defaultProvider="ShoppingCartProvider"&gt;<BR>&nbsp;&nbsp;&nbsp;&lt;providers&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;add name="<FONT color=#ff0000>ShoppingCartProvider</FONT>" connectionStringName="SQLProfileConnString" type="<FONT color=#ff0000>PetShop.Profile.PetShopProfileProvider</FONT>" applicationName=".NET Pet Shop 4.0"/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;add name="<FONT color=#ff0000>WishListProvider</FONT>" connectionStringName="SQLProfileConnString" type="<FONT color=#ff0000>PetShop.Profile.PetShopProfileProvider</FONT>" applicationName=".NET Pet Shop 4.0"/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;add name="<FONT color=#ff0000>AccountInfoProvider</FONT>" connectionStringName="SQLProfileConnString" type="<FONT color=#ff0000>PetShop.Profile.PetShopProfileProvider</FONT>" applicationName=".NET Pet Shop 4.0"/&gt;<BR>&nbsp;&nbsp;&nbsp;&lt;/providers&gt;<BR>&nbsp;&nbsp;&nbsp;&lt;properties&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;add name="<FONT color=#ff0000>ShoppingCart</FONT>" <FONT color=#3366ff>type="PetShop.BLL.Cart"</FONT> allowAnonymous="true" provider="ShoppingCartProvider"/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;add name="<FONT color=#ff0000>WishList</FONT>" type="<FONT color=#3366ff>PetShop.BLL.Cart</FONT>" allowAnonymous="true" provider="WishListProvider"/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;add name="<FONT color=#ff0000>AccountInfo"</FONT> <FONT color=#3366ff>type="PetShop.Model.AddressInfo</FONT>" allowAnonymous="false" provider="<FONT color=#ff0000>AccountInfoProvider</FONT>"/&gt;<BR>&nbsp;&nbsp;&nbsp;&lt;/properties&gt;<BR>&nbsp;&nbsp;&lt;/profile&gt;</P> <P><FONT color=#ff00ff>PetShop.BLL.Cart</FONT></P> <P><FONT color=#ff00ff>PetShop.Model.AddressInfo</FONT></P> <P><FONT color=#ff00ff>在调用的时候这样</FONT></P> <P mce_keep="true">请问 Profile.WishList.CartItems</P> <P mce_keep="true"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Profile.WishList.Remove(e.CommandArgument.ToString());<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;&nbsp;&nbsp;case "Move":<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Profile.WishList.Remove(e.CommandArgument.ToString());<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Profile.ShoppingCart.Add(e.CommandArgument.ToString());<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;Profile.Save();</P> <P mce_keep="true">请问 Profile.WishList.Remove&nbsp;&nbsp; 这些调用的是<FONT color=#ff00ff>PetShop.BLL.Cart 的方法 还是调用的</FONT></P> <P mce_keep="true">public sealed class PetShopProfileProvider : ProfileProvider </P> <P>{//实现</P> <P>} 这个地方定义的方法&nbsp; 谢谢&nbsp; 我困惑啊</P>
问题补充: public sealed class PetShopProfileProvider : ProfileProvider {//实现 } 这个类起得作用是什么 我感觉没什么用处!!! 我知道重写基类 但是没感觉到用在了哪里!!
barney的主页 barney | 初学一级 | 园豆:0
提问于:2008-07-24 22:35
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册