locked
GridView on Mousehover of Each Row Display image from DB or XML RRS feed

  • Question

  • User285990374 posted

    Hi,

          Can anybody please let me know how can I get an Image from the Database on Mouseover of Each row of gridview.

    Thanks ..

    Monday, June 27, 2011 2:27 AM

Answers

  • User377791177 posted

    1. you can create an HTTP handerl for image's dispatch.

    2. put a hidden div/panel with an image inside.

    3. on mouseover change the image's src property and point it to HttpHandler which will get the image , you can provide some key in query string. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, June 27, 2011 2:37 AM
  • User3866881 posted

          Can anybody please let me know how can I get an Image from the Database on Mouseover of Each row of gridview.

    Hello:)

    I think you can bind the Image with ImageField in the GridView. And then use jQuery like this:

    //For Starting, hidden all the images:

    $(function(){

          $("img").css("display","none");

          $("tr").mouseover(function(){

               $(this).find("img:eq(0)").css("display","block");

    });

    })

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, June 28, 2011 10:34 PM

All replies

  • User377791177 posted

    1. you can create an HTTP handerl for image's dispatch.

    2. put a hidden div/panel with an image inside.

    3. on mouseover change the image's src property and point it to HttpHandler which will get the image , you can provide some key in query string. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, June 27, 2011 2:37 AM
  • User-330204900 posted

    Hi snigdharjun, are you on Dynamic Data?

    Monday, June 27, 2011 7:29 AM
  • User3866881 posted

          Can anybody please let me know how can I get an Image from the Database on Mouseover of Each row of gridview.

    Hello:)

    I think you can bind the Image with ImageField in the GridView. And then use jQuery like this:

    //For Starting, hidden all the images:

    $(function(){

          $("img").css("display","none");

          $("tr").mouseover(function(){

               $(this).find("img:eq(0)").css("display","block");

    });

    })

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, June 28, 2011 10:34 PM
  • User2021055510 posted

    You can use handlers. Have a ashx like ImageHandler.ashx

    on row mouseover, set the img src="ImageHandler.asxh?imageid=id"

    public void ProcessRequest(HttpContext context)
            {
                context.Response.ContentType = "image/png";
                context.Response.Write(QuerFromDB(Request.QueryString["imageid"]));
            }

    Wednesday, June 29, 2011 1:21 AM
  • User377791177 posted

    You can use handlers. Have a ashx like ImageHandler.ashx

    on row mouseover, set the img src="ImageHandler.asxh?imageid=id"

    public void ProcessRequest(HttpContext context)
            {
                context.Response.ContentType = "image/png";
                context.Response.Write(QuerFromDB(Request.QueryString["imageid"]));
            }

    what this entire post has to do with the answer??

    Monday, July 4, 2011 2:34 AM