Total members 11893 |It is currently Tue Nov 05, 2024 12:25 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





Code:
namespace Passing_Data
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Form2 frm = new Form2(textBox1.Text);
            frm.Show();

        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }
    }
}
FORM 2:
namespace Passing_Data
{
    public partial class Form2 : Form
    {
        public Form2(String strTextBox)
        {
            InitializeComponent();
            label1.Text = strTextBox;
        }

        private void Form2_Load(object sender, EventArgs e)
        {

        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {

        }
    }
}

I have form one with textbox and button- I enter data in textbox and click button to take me to form 2. form two has label and combobox. data displays now in label.
I want to be able to enter data in textbox on form 1 and have it entered in combobox on page two.
I have tried combobox1.items.add(strTextBox) in form2 _load- not working
thank you




Author:
Newbie
User avatar Posts: 2
Have thanks: 0 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : add data from form1 textbox to form2 combo box
 calling method to form- displaying textbox data in messagbox     -  
 Help combo box     -  
 AutoComplete TextBox     -  
 how to show hashmap value in a textbox     -  
 Disable TextBox html by php     -  
 c++/data structure     -  
 Data set for ID3 algorithm     -  
 What is Data integration?     -  
 Data Encryption Standard (DES)     -  
 Send data without a form     -  









Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com