Hi, I am creating a project to display the image using httphandler by hitting a url of the videoserver, can anyone help me how to pass the url value to the httphandler.
for eg: the url of the videoserver is http://172.15.84.125/cgi-bin/video.jpg, how to pass this value to the httphandler
when i access the handler using the following line
image1.imageURL="~/Imagehandler.ashx";
here, image1 i s the image control and Imagehandler is the name of the Generic handler
Be aware that it can be dangerous to send the entire path to the image by various reasons. Using a string in a session is a safer way to pass that information. Or as an alternative, image1.imageURL="agr98gifj", where "agr98gifj" is a hash value, that in
a hash table is translated to a correct image path (e.g. "http://172.15.84.125/cgi-bin/video.jpg").
renuga
Member
59 Points
101 Posts
how to pass a value to httphandler
Oct 01, 2008 09:32 AM|LINK
Hi, I am creating a project to display the image using httphandler by hitting a url of the videoserver, can anyone help me how to pass the url value to the httphandler.
for eg: the url of the videoserver is http://172.15.84.125/cgi-bin/video.jpg, how to pass this value to the httphandler
when i access the handler using the following line
image1.imageURL="~/Imagehandler.ashx";
here, image1 i s the image control and Imagehandler is the name of the Generic handler
Thanks,
how to pass a value to httphandler
Ocean - MSFT
Member
4 Points
2 Posts
Re: how to pass a value to httphandler
Oct 01, 2008 10:42 AM|LINK
Please check this link,
http://msdn.microsoft.com/en-us/library/bb398986.aspx
yrajasekhar
Participant
1802 Points
247 Posts
Re: how to pass a value to httphandler
Oct 01, 2008 11:05 AM|LINK
Hi, You can pass url of the image in query string like this
image1.imageURL="~/Imagehandler.ashx?imageurl=http://172.15.84.125/cgi-bin/video.jpg";
In HTTP Handler you can get image url by using Request.QueryString["imageurl"]
Movie reviews using twitter http://www.cinegyan.net
Henxon
Member
150 Points
121 Posts
Re: how to pass a value to httphandler
May 05, 2010 09:08 AM|LINK
Be aware that it can be dangerous to send the entire path to the image by various reasons. Using a string in a session is a safer way to pass that information. Or as an alternative, image1.imageURL="agr98gifj", where "agr98gifj" is a hash value, that in a hash table is translated to a correct image path (e.g. "http://172.15.84.125/cgi-bin/video.jpg").