Click here to Skip to main content
15,894,017 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
Hi All,

I want display homepage when particular user log in but that hompage consist with all info of that user with label,picturebox,etc controls,

Please help me.

Thanks in Advance.
Posted
Updated 10-Jun-11 22:04pm
v2
Comments
Sergey Alexandrovich Kryukov 11-Jun-11 23:56pm    
That's not a question. What's the problem?
--SA

 
Share this answer
 
Comments
RaviRanjanKr 11-Jun-11 16:36pm    
Good, My 5!
ambarishtv 12-Jun-11 3:59am    
thanks ravi :)
The guy just logged in, so you know who he is - you can get the information from wherever it was you stored it (hopefully a database).

So display it! What part of this is causing you problems?
 
Share this answer
 
you can do it like this too:

Create a Property in Homeform

Like this

private string userName;

public string UserName
{
   get { return userName; }
   set { userName = value; }
}


then From loginForm

set the UserName Property of Homeform to the username that who is logged in

I mean by this

if (.....)//Here You need to check the condition that the user is valid or not
            {
                FrmHome sd = new FrmHome();
                sd.UserName = textBox1.Text;
                sd.Show();
            }


then you will get the username of user who logged in to homefrom

If you wish to show the Username in a label Use this

private void FrmHome_Load(object sender, EventArgs e)
       {
           label1.Text = "Hai " + userName;
       }


If you got answer by this...

Click Accept Solution button on top...
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900