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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Abhishek KumarRank #510 · 4.8K reputationPosted Oct 17, 2014, 1:24 AM EDT
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