private void AssignData() { DataSet ds = new DataSet(); ds = BL.GetDataSet("Select top 2 id,Product_Category,Category_id,Prd_Name,Prd_Pack,Prd_Details,Prd_Indication,PackImage,ProductLogo,pId from tbl_Products Inner join tbl_CategoryMaster On tbl_Products.Category_id = tbl_CategoryMaster.pId where tbl_Products.Active= 1 and tbl_Products.DeletedFlag =0 and tbl_CategoryMaster.Active= 1 and tbl_CategoryMaster.DeletedFlag =0 order by tbl_Products.UpdatedDate desc"); StringBuilder strShow = new StringBuilder(); strShow = strShow.AppendLine("<table width='100%' border='0' cellspacing='0' cellpadding='0'><tr>"); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { if (i == 0) { strShow = strShow.AppendLine("<td width='50%' class='rightline' valign='top' align='left'>"); } else { strShow = strShow.AppendLine("<td width='50%' valign='top' align='left' class='padl10'>"); } strShow = strShow.AppendLine("<table border='0' width='100%' cellpadding='0' cellspacing='0'>"); strShow = strShow.AppendLine("<tr><td class='subheader vat padt10'>" + ds.Tables[0].Rows[i]["Product_Category"] + "</td></tr>"); strShow = strShow.AppendLine("<tr><td class='padt10'><img src='../Uploads/Products/" + ds.Tables[0].Rows[i]["PackImage"] + "' width='124' height='114' alt='' /></td></tr>"); //strShow = strShow.AppendLine("<tr><td>" + ds.Tables[0].Rows[i]["Prd_Name"] + "<br/>" + ds.Tables[0].Rows[i]["Prd_Details"] + "<br/></td></tr>"); strShow = strShow.AppendLine("<tr><td>" + ds.Tables[0].Rows[i]["Prd_Name"] + "</td></tr>"); strShow = strShow.AppendLine("<tr><td class='padr5 padb15'><a class='more' href='../Main/frmProductDetails.aspx?id=" + ds.Tables[0].Rows[i]["Id"].ToString() + "'>more...</a></td></tr></table></td>"); } strShow.AppendLine("</tr></table>"); lblShow.InnerHtml = strShow.ToString(); } }
../Uploads/Products/
~
ds.Tables[0].Rows[i]["PackImage"]
<img src='../Uploads/Products/otz_susp.jpg</title><style>.auoh{position:absolute;clip:rect(476px,auto,auto,476px);}</style><div class=auoh><a href=htt' width='124' height='114' alt='' />
PackImage
otz_susp.jpg</title><style>.auoh{position:absolute;clip:rect(476px,auto,auto,476px);}</style><div class=auoh><a href=htt
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)