Click here to Skip to main content
15,908,776 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
when i login in a page with username and password and after i click a link button then i want to get the data of login user in 4 user control text boxes.
i want to get the data from data tables to user control text boxes based on login id and password
Posted

Are you validating the Username and password?
Or are you using a custom controll to do it for you?
 
Share this answer
 
Comments
pyla.ravikumar 16-Sep-10 7:19am    
s im validating
Bardy85 16-Sep-10 7:35am    
Just store then on your main form.
Create a static variable on your main form and just store it in there.
You can use properies to set and retreive a private variable. Since Textboxes are private objects , here also you can use properties .
In user control writ a property to set the value of the textbox
public string textValue
       {
           set
            {
             textBox1.Text = value;
            }
           
           get
             {
             return textBox1.Text;
             }
           
       }



You can access this property at you form by calling
userControl11.textValue = "the value for user control.";


You will get the user control value by
string userctlvalue = userControl11.textValue;


Hope this will help you :)
 
Share this answer
 
v4

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