0

Good Morning All

Am trying to Store the username of the User that will be loged on. choose to use the Profile, and i have done the following from the Web Config file

<profile enabled ="true">			<properties>				<add name ="Username" readOnly ="false" allowAnonymous ="true"/>			</properties>		</profile>

And am Storing the Username to the Profile like this

Profile.UserName = username;

I get an error the C# code that says

property or indexer 'System.web.ProfilerBase.Username' cannot be assigned to--it is read only

Thanks

2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by vuyiswamb
0

Username is already a property of the profile set to readonly, are you trying to add a property or use the current one?

if you need to add a new property, change it to something else like loggedinuser

0

Username is already a property of the profile set to readonly, are you trying to add a property or use the current one?

if you need to add a new property, change it to something else like loggedinuser

Thank you very much

It worked

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.