Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Profile Property not changed by login.asp.vb page

Reply
Thread Tools

Profile Property not changed by login.asp.vb page

 
 
=?Utf-8?B?Um9iZXJ0byBSYXp6YXV0aQ==?=
Guest
Posts: n/a
 
      04-05-2007
I've a problem to change a profile property during button click event in a
login.aspx page. I try to set profile.property = xxx but after authentication
this property remain to defaultvalue by web.config. In other hand if I set
the same property in other page (default.aspx) the value is correctly browsed.
Here is the code:

Web.config:
<configuration>
<connectionStrings>
<add name="Localsqlserver2005" connectionString="********"></add>
</connectionStrings>
<system.web>
<anonymousIdentification enabled="true"/>
<authentication mode="Forms">
<forms loginUrl="Login.aspx" defaultUrl="default.aspx"></forms>
</authentication>
<authorization>
<deny users="?" />
</authorization>
<profile defaultProvider="aspnetsql2005profileprovider"
automaticSaveEnabled="true" enabled="true">
<providers>
<clear/>
<add name="aspnetsql2005profileprovider"
connectionStringName="Localsqlserver2005" applicationName="/"
type="system.web.profile.sqlprofileprovider, system.web, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
<properties>
<add name="IDANA" type="system.int32" allowAnonymous="true"
defaultValue="1"></add>
</properties>
</profile>


Login.aspx.vb:
.....
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click
if 1 = 1 then '''''' here is the routine to authenticato to db farm
Profile.IDANA = 50
FormsAuthentication.RedirectFromLoginPage(Me.TB_Us ername.Text, False)
'''' now the aspnetdb is updated
end if
................


default.aspx.vb (the redirect page from login)
....
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
Response.Write("Profilo IDANA=" & Profile.IDANA & "<br />")
'''''' the value browsed is 1 and not 50
Profile.IDANA = 24
Response.Write("Profilo IDANA=" & Profile.IDANA & "<br />")
'''''' now the value is 24
........


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting the value of a Master page's control's property using a property of the Master page Nathan Sokalski ASP .Net 25 03-04-2010 03:42 AM
changed state to up changed state to down FastEthernet LINEPROTO-5-UPDOWN surrealarmada@gmail.com Cisco 3 03-07-2007 06:06 PM
scroll position is changed when style is changed? mxbrunet Javascript 1 11-03-2006 03:40 AM
xmlDocument.Save "&#10;" getting changed changed to "&amp;#10" st@jpa.co.jp ASP .Net 1 10-11-2005 01:30 PM
Java Web Start app icons keep going in user profile not All Users profile Brad Java 1 07-19-2005 02:10 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57