private void AssignData() [英] private void AssignData()

查看:75
本文介绍了private void AssignData()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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();
    }
}









IMAGE不显示.........





IMAGE IS NOT DISPLAY .........

推荐答案

你所要做的就是查看源/生成的html,你会看到你的路径可能是错误的,然后你可以快速修复它。
All you have to do is look at the source/generated html and you'll see that your path is likely wrong and then you can fix it quickly.


是我检查所有可能的路径,但网站上没有显示静止图像。
yes i check the all possible path but still image is not display on the website.


这篇关于private void AssignData()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆