ASP.NET using c# in MultiColumns in a DropDownList

Unknown | 10:15 AM |

SqlCommand cmd;
        SqlConnection con;
        SqlDataAdapter da;
        DataSet ds;

        private void button1_Click(object sender, EventArgs e)
        {
            con = new SqlConnection("your_database_connection_sting");
            cmd =new SqlCommand ("select * from emp", con);
            da = new SqlDataAdapter(cmd);
            DataSet ds = new DataSet();
            da.Fill(ds);

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                comboBox1.Items.Add(ds.Tables[0].Rows[i][0] + " " + ds.Tables[0].Rows[i][1] + " " + ds.Tables[0].Rows[i][2]);  
            }
        }

Category:

About http://dotnetvisual.blogspot.in/:
DOT NET TO ASP.NET is a web application framework marketed by Microsoft that programmers can use to build dynamic web sites, web applications and web services. It is part of Microsoft's .NET platform and is the successor to Microsoft's Active Server Pages (ASP) technology. ASP.NET is built on the Common Language Runtime, allowing programmers to write ASP.NET code using any Microsoft .NET language. create an application very easily ....