Link to home
Start Free TrialLog in
Avatar of jr_bautista
jr_bautista

asked on

Profile object does not return value (Personalization in ASP.Net)

I  have this on my web.config file
<profile enabled="true">
        <properties>
          <add name="firstname" />
        </properties>  
</profile>      

and in my C# code to store value:

Profile.firstname = firstname.Text;    

and it does not returning value with this, the intellisense recognize the profile properties

Response.Write(Profile.firstname)

What's the problem?

SOLUTION
Avatar of guru_sami
guru_sami
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jr_bautista
jr_bautista

ASKER

I tried to add that Save but to no avail....
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It hangs when getting the profile. I think it's not saving to the database, I have the folder app_data and nothing is there. How can I specify to which table and MS SQL server it should save?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
still no value...

this is my connectionString

<connectionStrings>
       
 <add name="MyConnectionString" connectionString="Data Source=SQLxxx; Initial Catalog=MyDB;Persist Security Info=True;User ID=iisuser;Password=12345xxx" providerName="System.Data.SqlClient"/>            
 </connectionStrings>

In your code I  substituted "YourConnectionStringName" to "MyConnectionString"

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial