I am storing imageurl in database and i want to display that image in .aspx page by giving the image url to http handler because i tried to display image using image control by writing following code:
Largeimage.imageurl=imgpath (imgpath is the complete url which m getting form the database)
but the above code is not able to display the image ,so i thought i can use http handler for the same but i am not getting idea how to do these.
I f any body can give some idea about both way(using httphandler and directly writing the code on code behind file) then it will be very helpful to me.
using HTTPHandler is not the other solution here, what is there is in the path.
Double check your path if it is ok or not..because Largeimage.ImageUrl definitely works if your path is correct.
Moreover, don't use absolute path as here you storing complete url in ur db..dont do like that..store images in any of your folder inside your root folder and then use Server.MapPath("~/images/"+image file name)
Note : Jst check source of your page in the browser and check that what url that Largeimage control is renderring, and try that url directly in your browser, is image retrieved?
Pratik Galoria,
Software Engineer,
iGATE Global Solutions.
LavishMahesh...
0 Points
3 Posts
Regarding displaying image
Dec 10, 2012 07:04 AM|LINK
I am storing imageurl in database and i want to display that image in .aspx page by giving the image url to http handler because i tried to display image using image control by writing following code:
Largeimage.imageurl=imgpath (imgpath is the complete url which m getting form the database)
but the above code is not able to display the image ,so i thought i can use http handler for the same but i am not getting idea how to do these.
I f any body can give some idea about both way(using httphandler and directly writing the code on code behind file) then it will be very helpful to me.
pratik_galor...
Participant
1483 Points
330 Posts
Re: Regarding displaying image
Dec 10, 2012 08:37 AM|LINK
using HTTPHandler is not the other solution here, what is there is in the path.
Double check your path if it is ok or not..because Largeimage.ImageUrl definitely works if your path is correct.
Moreover, don't use absolute path as here you storing complete url in ur db..dont do like that..store images in any of your folder inside your root folder and then use Server.MapPath("~/images/"+image file name)
Note : Jst check source of your page in the browser and check that what url that Largeimage control is renderring, and try that url directly in your browser, is image retrieved?
Software Engineer,
iGATE Global Solutions.
pratik_galoria@yahoo.co.in
+91-8905195943
LavishMahesh...
0 Points
3 Posts
Re: Regarding displaying image
Jan 09, 2013 09:26 AM|LINK
Thnks
For these solution .....