- public void BindImages()
- {
- try
- {
- string query = "select * from Images where Prod_id=@Id";
- SqlCommand cmd = new SqlCommand(query, EcomConString);
- cmd.Parameters.AddWithValue("@Id", SqlDbType.VarChar).Value = id;
- cmd.CommandType = CommandType.Text;
- SqlDataAdapter sda = new SqlDataAdapter(cmd);
- DataTable dt = new DataTable();
- sda.Fill(dt);
- if (dt.Rows.Count > 0)
- {
- foreach (DataRow dr in dt.Rows)
- {
- strImages += @"
";strThumbImage += dr["Img"].ToString() + ",";+ dr["Img"] + @"' class='img-thumbnail' alt='' />
- }
- }
- }
- catch (Exception ex) { }
- }
Loading

Jignesh KumarRank #91 · 22.9K reputationPosted May 28, 2020, 10:54 PM EDT
Rajanikant HawaldarRank #110 · 20.3K reputationPosted May 28, 2020, 10:57 PM EDT
Salman BegRank #284 · 8.8K reputationPosted May 28, 2020, 11:04 PM EDT
Laxmidhar SahooRank #383 · 6.6K reputationPosted May 29, 2020, 12:08 AM EDT