Click here to Skip to main content
15,880,956 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
I'm working on windows form application.In this i have created User Details form in that i have Block button.My query is when i'm clicking one row from the user details and clicking Block button the selected user details should viewed in next form i.e Blocked form.For this i need guidance.Thanks in advance for reading my message.

Regards
Balamurugan
Posted
Comments
Varun Sareen 9-Oct-12 6:36am    
try to use a static variable by assigning the selected user id into it and then on the load event of using that static variable in the blocked form you can fetch all the details for that user id into the blocked page.
bbirajdar 9-Oct-12 6:39am    
What are your efforts..?? If you are not a software developer, then get help from some software developer
[no name] 9-Oct-12 6:51am    
I'm a software developer working on individual project.I got stuck into this process.I have seen your profile and blogs its really interesting people like you should guide us to travel for our carrier in a right path sir...

1 solution

Refer These :- Passing Data Between Forms[^]

You do:

//form1:
 public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            Form2 f2 = new Form2(textBox1.Text);
            f2.Show();
        }
    }
//form2:
    public partial class Form2 : Form
    {
        public Form2(string value)
        {
            InitializeComponent();
            textBox1.Text = value;
        }
    }
 
Share this answer
 
Comments
[no name] 9-Oct-12 6:46am    
I'm using Datagridview for UserDeails form so pl provide me the coding for tat process...

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