Exemplo n.º 1
0
    public string BindPopImages(string productid)
    {
        productManager objProduct = new productManager();

        objProduct.productId = Convert.ToInt32(productid);
        List <productManager> lmp = new List <productManager>();
        DataTable             dt  = new DataTable();

        dt = objProduct.SelectProductImage();
        string strImg = string.Empty;

        if (dt.Rows.Count > 0)
        {
            strImg += "<ul>";
            foreach (DataRow dr in dt.Rows)
            {
                strImg += "<li id=\"" + dr["productImagesId"].ToString() + "\">";
                strImg += "<img src=\"../" + AppSettings.PRODUCT_MEDIUM_ROOTURL + dr["imageName"].ToString() + "\" width='100px' height='100px' /><br />";
                strImg += "<a href=\"javascript:void(0)\" onclick=\"DeleteProductImage(" + dr["productImagesId"].ToString() + ");\"> Delete </a>";
                strImg += "</li>";
            }
            strImg += "</ul>";
        }
        return(strImg);
    }