| |

VerySource

 Forgot password?
 Register
Search
View: 604|Reply: 3

How to get username in FORMS verification ticket

[Copy link]

2

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-3-5 15:00:01
| Show all posts |Read mode
After successfully logging in with FORMS authentication, I want to make a welcome function, such as welcoming you, **, ** are currently logged in administrator accounts, I do n’t want to use session to record, but I do n’t know how to get the username in the FORMS authentication ticket Please help me, how to get the username in the FORMS verification ticket!
Reply

Use magic Report

0

Threads

4

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-5-22 07:15:01
| Show all posts
//log in page
Response.Redirect ("Index.aspx? Name =" '+ txtUserName.Text +');
Name: parameter name;
txtUserName.Text: the value in the text box


// Index page Page_Load
string strName = Request.QueryString ["Name"]. ToString ();
Response.Write (strName + "Hello");
Reply

Use magic Report

0

Threads

32

Posts

20.00

Credits

Newbie

Rank: 1

Credits
20.00

 United States

Post time: 2020-5-22 16:15:01
| Show all posts
Page.user.identity.name
Reply

Use magic Report

2

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-5-23 10:15:01
| Show all posts
Thanks, the problem is solved!
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list