In web forms I can do with this by sessions but how can i do this in windows applications?? :(
I am a beginner so plz give an example to understand.
Login Form

Display Form



Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Abhishek KumarPosted Oct 17, 2014, 5:24 AM
In windows web like session concept is not present.
For your requirement you can use the implementation as below.
Try this it may help.
public static class LoginData
{
public static string UserID;
public static string UserName;
}
Set the value
LogInfo.UserName="Abhishek";
Read the value
MessageBox.Show(LoginData.UserName)
TextBox1.Text= LogInfo.UserName
Abhishek