473,395 Members | 2,437 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Profile System Asp.net 2005

I am working on Profile system.I am using CreateUserWizard control for
creating New User.I want to add more information other than
(UserName,Email,Password,ConfirmPassword.....) such as
Country,Gender,Age.So I need to use Profile system.
I added the following code in web.config file:
<profile enabled="true">
<providers>
<add name="AspNetSqlProvider"
connectionStringName="EmailSystemConnectionString" plicationName="/"
type="System.Web.Profile.SqlProfileProvider"></add>
</providers>
<properties>
<add name="Country" type="string"/>
<add name="Gender" type="string"/>
<add name="Age" type="string"/>
</properties>
</profile>
</system.web>
I added the Following code in .cs file
protected void CreateUserWizard1_CreatedUser(object sender, EventArgs
e)
{
ProfileCommon p =
(ProfileCommon)ProfileCommon.Create(CreateUserWiza rd1.UserName, true);
p.Country = "INDIA";
p.Gender = "MALE";
p.Age = "MALE";
p.Save();

}

Code is working fine with out any errors.But After successful Run I
can't see any values under the table aspnet_Profile.Is anything else to
be added.
Thanks
Vishnu Priya

Nov 24 '06 #1
1 1246
The built-in Profile Provider serializes all Profile properties to opaque
text or binary in a single table column.
If you want discombobulated Profile entries in a typical Database table with
a column for each profile Property, then you need to look at the custom Table
provider and / or Stored Procedure providers.

Example (there are many others):
http://www.eggheadcafe.com/articles/20060731.asp

Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"vi****@visrez.com" wrote:
I am working on Profile system.I am using CreateUserWizard control for
creating New User.I want to add more information other than
(UserName,Email,Password,ConfirmPassword.....) such as
Country,Gender,Age.So I need to use Profile system.
I added the following code in web.config file:
<profile enabled="true">
<providers>
<add name="AspNetSqlProvider"
connectionStringName="EmailSystemConnectionString" plicationName="/"
type="System.Web.Profile.SqlProfileProvider"></add>
</providers>
<properties>
<add name="Country" type="string"/>
<add name="Gender" type="string"/>
<add name="Age" type="string"/>
</properties>
</profile>
</system.web>
I added the Following code in .cs file
protected void CreateUserWizard1_CreatedUser(object sender, EventArgs
e)
{
ProfileCommon p =
(ProfileCommon)ProfileCommon.Create(CreateUserWiza rd1.UserName, true);
p.Country = "INDIA";
p.Gender = "MALE";
p.Age = "MALE";
p.Save();

}

Code is working fine with out any errors.But After successful Run I
can't see any values under the table aspnet_Profile.Is anything else to
be added.
Thanks
Vishnu Priya

Nov 25 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: | last post by:
Hi all, How can I get a reference to my custom profile provider in my .aspx page? I have looked at httpcontext.current.profile. But from there where do I go? Ideally I would like to be able to...
6
by: Shimon Sim | last post by:
Hi I am working on application that need to hold custom user information - Last and first name, email, some other domain related information. I used to create Base class for all my pages. The base...
0
by: Miguel Dias Moura | last post by:
Hello, I am saving a complex type in Asp.Net 2.0 profile. I am using an SQL 2005 database as a profile provider. I have been consulting MSDN as help to create my class. (Please, see my code...
5
by: Saber | last post by:
in <system.web> of web.config I've: <profile> <properties> <add name="EnterTime" type="System.DateTime" allowAnonymous="true"/> </properties> </profile> And in Session_Start of global.asax:
6
by: Jeff | last post by:
Hey (and thank you for reading my post) In visual web developer 2005 express edition I've created a simple website project.. At this website I want users who register to be able to upload a...
0
by: Anonieko | last post by:
A lot of times, web hostings for ASPNET 2.0 will offer only MS Access DB for database for basic plan, a question often asked is how can I use the membership services, role, web parts services, etc ...
1
by: mihir.kotwal | last post by:
I am trying to make a profile page that displays a user's profile picture if they have added one. If they haven't added a picture, I want a hyperlink to link to a page to upload it to the server. I...
2
by: Peter Afonin | last post by:
Hello, I'm using CreateUserWizard control in ASP.NET 2.0. I'm storing the data in SQL Server 2005. The first and last steps run smoothly without any problems. But I added one middle step to...
1
by: Steve Harclerode | last post by:
I just tried to use the Profile Object for the first time. I created a new website, added the below items to the web.config, and then tried to set the property in C# code. Intellisense works,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.