.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Post New Web Links

Where Id

Posted By:      Posted Date: October 04, 2010    Points: 0   Category :ASP.Net

Hi All,

My code for fill dropdownlist:

            string Priimek = string.Empty;
            string Ime = string.Empty;
            string newName = string.Empty;

            string sqlStatement = "SELECT * from tbl_zaposleni;Select * from tbl_avtomobili";
            using (SqlCommand sqlCmd = new SqlCommand(sqlStatement, connectionString))
                SqlDataReader sqlReader = sqlCmd.ExecuteReader();

                    if (sqlReader.HasRows)
                        while (sqlReader.Read())
                            newName = string.Concat(sqlReader["Priimek"].ToString(), " ", sqlReader["Ime"].ToString());
                            ddlVoznik.Items.Add(new ListItem(newName));
                            ddlOdredil.Items.Add(new ListItem(newName));


                        if (sqlReader.HasRows)
                            while (sqlReader.Read())
                                newName = string.Concat(sqlReader["NazivVozila"].ToString(), " ", sqlReader["RegistrskaStevilka"].ToString(), " (&quo

View Complete Post

More Related Resource Links

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend