S
Scooby Dog
Could someone help me with the following:
I have been reading (learning asp.net) the book ASP.net 3.5 for dummies.
In the book chp18 to be exact the author uses HttpContext.Current.profile
and casts that to a ProfileCommon. I understand PostBack and session
Variables, viewstate, and hidden fields but what is 'HttpContext, and
ProfileCommon'. Is HttpContext like some master session thing that both
keeps track of user info ie: ip, login etc and allows you to store data with
in it. Is ProfileCommon a way to write serialized data ie: objects to xml
files or sql databases.
Dim pfile As ProfileCommon
pfile = CType(HttpContext.Current.Profile, ProfileCommon)
pfile.ShoppingCart = New ShoppingCart ' ShoppingCart is a serialized class
with a List(Of cartitems)
pfile.Save()
*********************web.config entry*********************
<profile enabled="true" defaultProvider="AspNetSqlProfileProvider">
<properties>
<add name="ShoppingCart" type="ShoppingCart"
serializeAs="Xml" allowAnonymous="true"/>
</properties>
</profile>
******************************************************
Thanks
Dave
I have been reading (learning asp.net) the book ASP.net 3.5 for dummies.
In the book chp18 to be exact the author uses HttpContext.Current.profile
and casts that to a ProfileCommon. I understand PostBack and session
Variables, viewstate, and hidden fields but what is 'HttpContext, and
ProfileCommon'. Is HttpContext like some master session thing that both
keeps track of user info ie: ip, login etc and allows you to store data with
in it. Is ProfileCommon a way to write serialized data ie: objects to xml
files or sql databases.
Dim pfile As ProfileCommon
pfile = CType(HttpContext.Current.Profile, ProfileCommon)
pfile.ShoppingCart = New ShoppingCart ' ShoppingCart is a serialized class
with a List(Of cartitems)
pfile.Save()
*********************web.config entry*********************
<profile enabled="true" defaultProvider="AspNetSqlProfileProvider">
<properties>
<add name="ShoppingCart" type="ShoppingCart"
serializeAs="Xml" allowAnonymous="true"/>
</properties>
</profile>
******************************************************
Thanks
Dave