开发者

how to display uploaded images in Literal Control?

Code to display images

public void LiteralDynamic()  
{  
    ProTrakEntities proEntity = ne开发者_StackOverflow社区w ProTrakEntities();  
    if (Request.QueryString["Id"] != null)  
    {  
        string qString = Request.QueryString["Id"].ToString();  

        var guid = (from g in proEntity.Projects where g.ProjectGuid == qString select g).First();  
        int pID = Convert.ToInt32(guid.ProjectId);
        List<ProjectImage> image =(from f in proEntity.ProjectImages where f.ProjectId == pID select f).ToList();
        //string filename = (image.Filename).ToString();

        foreach (var fName in image)
        {
            string imageHTML = @"<ul ><li><img src='" + Server.MapPath("Uploads/" + fName.Filename) + "' alt='Image1' /></li></ul>";

            Literal1.Text+=imageHTML;
        }

}

**Script** 
 <script type="text/javascript">
       $(window).bind("load", function () {
        $("div#mygalone").slideView()
    });
</script>
<script type="text/javascript">
    $(window).bind("load", function () {
        $("div#myInstantGallery").slideView({
            easeFunc: "easeInOutBack",
            easeTime: 1200
        });
    });
</script>

while debugging the images are retrieving,but running the skeleton images like shadows but image not displayed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜