protected void DDLCity_SelectedIndexChanged(object sender, EventArgs e) { SqlConnection con = new SqlConnection(connectionString); SqlCommand cmd = new SqlCommand("procGetSponsorDetails",con); con.Open(); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@CityId", SqlDbType.Int).Value = DDLCity.SelectedItem.Value; SqlDataReader sdr = cmd.ExecuteReader(); //cmd.ExecuteReader(); if (sdr.Read()) { ImgLogoSponsor.ImageUrl = Server.MapPath("~/Templates/") + sdr[0].ToString(); LblAllotedCards.Text = sdr[10].ToString(); } sdr.Close(); con.Close(); } }