profile in asp.net - Community Credit Forums
in

    Community Credit Forums

profile in asp.net

Last post Mon, Feb 19 2007 5:57 AM by DavidSilverlight. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • Mon, Feb 19 2007 5:37 AM

    • tinagour
    • Top 75 Contributor
    • Joined on Fri, Feb 16 2007
    • Posts 6

    profile in asp.net

    i wan to store user data like telephone no.,zip,address in db hw to do it using profile pls help its urgent
  • Mon, Feb 19 2007 5:57 AM In reply to

    Re: profile in asp.net

    Hello Tina,

         In 2.0, it is super easy.  Profiles are one of the really great new features of 2.0 and is built right into it.   The only thing that you really have to do is to declare them in the web.config file.  That is it.  Done. finito.   I have included a snippet from a web.config below.  It has to be located within the </system.web>section.  When the user logs in, their profile will be automatically loaded. Whenever you want to update any of the profile values, you just use the Static Profile object. Because it is a static object, you do not need to declare it, you can simply use it.  For example, in your code, you can update the SpokenLanguage property just by coding Profile.SpokenLanguage = "English".  The data from the profile is automatically saved in the same database that the other membership information is.  If you download the demo files from this presentation that I did, I include a few examples in action.  Here is the URL: http://www.xmlpitstop.com/ArticleManagement/DisplayArticle.aspx?ResourceID=130

    <profile>
         <
    properties>
             
    <add name="Theme" type="System.String" allowAnonymous="false" defaultValue="standard"/>
              <
    add name="BusPhone" type="System.String" allowAnonymous="false" defaultValue="" />
              <
    add name="HomePhone" type="System.String" allowAnonymous="false" defaultValue=""/>
              <
    add name="StreetAddress" type="System.String" allowAnonymous="false" defaultValue=""/>
             <add name="City" type="System.String" allowAnonymous="false" defaultValue=""/>
             <
    add name="State" type="System.String" allowAnonymous="false" defaultValue=""/>
             <
    add name="ZipCode" type="System.String" allowAnonymous="false" defaultValue=""/>
             <add name="Country" type="System.String" allowAnonymous="false" defaultValue=""/>
             <add name="SpokenLanguage" type="System.String" allowAnonymous="false" defaultValue="English"/>
        
    </properties>
    </
    profile>

    Kindest regards,
      David Silverlight

    Follow me on Twitter: @HeadGeek
    Filed under:
Page 1 of 1 (2 items)
Powered by Community Server (Commercial Edition), by Telligent Systems