473,394 Members | 1,951 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,394 software developers and data experts.

Profile Property not changed by login.asp.vb page

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
........
Apr 5 '07 #1
0 1319

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

Similar topics

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...
8
by: VB Programmer | last post by:
I would appreciate your assistance on this ASP.NET 2.0 site.... This is the wierd problem: While accessing the built in .NET functions for 'profiling' or 'membership' an error is generated (see...
1
by: Giovanni | last post by:
Dear Friends, I am having problems with the following: I have added a Login control to a web page. In the Login control's Authenticate event, I am performing additional validation against our...
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 ...
2
by: jdp | last post by:
I've created a custom login control with values that are not used in the Membership table. I created these other fields through the <profiletag in the web config. I'm able to get a new member...
2
by: Darius | last post by:
Hello I implemented custom profile provider based on the example at http://msdn2.microsoft.com/en-us/library/ta63b872.aspx. It reads Profiles values from tables in Sql Server. Everytime when...
1
by: Rusty Hill | last post by:
My site does not allow anonymous users. After a user has logged in and been authenticated I need to access some information in their profile object. I thought I would do this in the LoggedIn...
3
by: Oriane | last post by:
Hi there, I would like to open my Asp.Net project as a "Web Application" rather than as a "Web Site" in Visual Studio. But the thing is that I use the System.Web.Profile and the auto-generated...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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...

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.