Hi guys, Iām getting to the error. See my code below and suggest me what I did wrong:
HTML:
string ProductImages = string.Empty; string str_query = string.Empty; DataTable dt_Common = new DataTable(); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { bind_images(); } }
Code:
private void bind_images() { if (Request.QueryString["id"] != null) { str_query = "select top(5) image from tbl_product_images where productinfo_id='" + Request.QueryString["id"].ToString() + "'"; dt_Common = new CommonClass().bind_department(str_query); if (dt_Common.Rows.Count> 0) { for (int i = 0; i < dt_Common.Rows.Count; i++) { div_images.InnerHtml += "<a class=\"activeborder\" data-image=" + dt_Common.Rows[i]["image"] + " data-zoom-image=" + dt_Common.Rows[i]["image"] + "><img src=" + dt_Common.Rows[i]["image"] + " /></a>"; // Getting error in this line. } } } else { } }
I have tried this from the last days, but have not received a solution. Any suggestion really appreciated.
John source share