how to retrive image on server side using datatable

how to retrive image on server side using datatable

promispromis Posts: 4Questions: 2Answers: 0

how to retrive image on server side using datatable

Answers

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    You need to provide more detail.
    Do you currently have working server-side processing? What database? Does it hold images or the addresses of images?
    Have you looked at columns.render, to provide a column with an img tag?

  • promispromis Posts: 4Questions: 2Answers: 0
    edited July 2017
    {
                                 "sName": "BannerImage",
                                 "bSearchable": true,
                                 "bSortable": true,
                                 "mRender": function (midbannerImagePath, BannerImage, type, full) {
                                     return '<img src=' + midbannerImagePath  + ' id="imgAdvertise"  height="30" width="25" >'
                                    
                                 }, 
                             },
    

    am using this direction image can not display when inspect element show this path

    <img src="/Content/MidBannerImage/636234646346927618.png" id="imgAdvertise" height="30" width="25">
    

    But image can not display

    Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

  • allanallan Posts: 64,126Questions: 1Answers: 10,579 Site admin

    /Content/MidBannerImage/636234646346927618.png

    Does the file exist at that path? What is the server returning when the browser attempts to load that file? You'll be able to see that information in the "Network" panel of your browser's inspector.

    Allan

This discussion has been closed.