前几天下了个petshop4.0的,是用2.0开发的可以一直不明白他的那个Login控件的道理他不用一行代码就可以登陆,是如何做到的呢?
好像又没有对数据库进行操作,这些数据是怎么来的呢?

解决方案 »

  1.   

    她就是用的Login控件吧,还有Profile部分,应该注意她在web.config中的设置:<profile automaticSaveEnabled="false" defaultProvider="ShoppingCartProvider">
    <providers>
    <add name="ShoppingCartProvider" connectionStringName="SQLProfileConnString" type="PetShop.Profile.PetShopProfileProvider" applicationName=".NET Pet Shop 4.0"/>
    <add name="WishListProvider" connectionStringName="SQLProfileConnString" type="PetShop.Profile.PetShopProfileProvider" applicationName=".NET Pet Shop 4.0"/>
    <add name="AccountInfoProvider" connectionStringName="SQLProfileConnString" type="PetShop.Profile.PetShopProfileProvider" applicationName=".NET Pet Shop 4.0"/>
    </providers>
    <properties>
    <add name="ShoppingCart" type="PetShop.BLL.Cart" allowAnonymous="true" provider="ShoppingCartProvider"/>
    <add name="WishList" type="PetShop.BLL.Cart" allowAnonymous="true" provider="WishListProvider"/>
    <add name="AccountInfo" type="PetShop.Model.AddressInfo" allowAnonymous="false" provider="AccountInfoProvider"/>
    </properties>
    </profile>