ad,
Yes, you can set the user identity yourself. However, you can't just
set the identity like you want.
What you need to do is create a custom membership and possibly a role
provider for ASP.NET.
Take a look at the document on MSDN titled "Membership Providers",
located at (watch for line wrap):
http://msdn.microsoft.com/library/de...vMod_Intro.asp
It should help you out.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"ad" <fl****@wfes.tcc.edu.tw> wrote in message
news:O9**************@TK2MSFTNGP12.phx.gbl...
The User.Identity of WebPages is set with login controls in asp.net 2.0.
Can we set the User.Identity with program not by Login Controls?
I have tried the code:
this.User.Identity="Jhon", but it fail when compile.