Last post May 15, 2009 09:00 AM by docluv
Apr 29, 2009 04:19 AM|renuga|LINK
I am using the http handlers to fetch and display the image , now I need to display the timestamp also, for that I need to create a label control and update with the current time.
Any ideas of how to create the label in the httphandler
how to create andload the label from the httphandler in the web page
Apr 29, 2009 04:41 AM|XIII|LINK
I think you're looking for watermarking your image with the httphandler instead. Take a look here on how to accomplish this:
May 04, 2009 02:16 AM|renuga|LINK
It is not watermark.
I have a usercontrol with the Label and Image control prsent inside it, from the User control image i am calling the http handler and displaying the image for every 1 sec, now the requirement is to display the time in the label value.
May 04, 2009 03:54 AM|XIII|LINK
displaying the image for every 1 sec, now the requirement is to display the time in the label value.
element with the time everytime you set the src attribute of the image.
May 08, 2009 03:58 AM|renuga|LINK
Sorry for the late response,
and display in the label present above the image control.
May 08, 2009 04:37 AM|XIII|LINK
Is it possible to give the timestamp from the httphandler and display in the label present above the image control.
Err, I don't really understand your question here. You can provide the timestamp by using ajax at the same time to get the timestamp of the server if needed.
May 08, 2009 05:17 AM|renuga|LINK
Thanks for the response.
I am using the following lines inside the script for calling the handler.
var url="../UserControl/ImageHandler.ashx?Name=" + CameraName+ "&lq=" + Math.random();
document.getElementById('CamImage').src = url;
In the httphandler, Process request I am calling the server method to fetcht the image and the timestamp from the server
bFlag = oCameraServer.GetCameraData(strCameraName,
and displaying the image using this statement
the user control aspx contains
Can you please guide me how this can be done.
May 15, 2009 08:53 AM|XIII|LINK
I don't think you can pass it that way and need to use ajax to explicitely grab it from the server when needed. The outputstream gets written to the browser but doesn't contain the timestamp you're after.
May 15, 2009 09:00 AM|docluv|LINK
You are not going to be able to set the label from the httpHandler. You will need to make two request, assuming you did not download the image label when you created the page in the first place. But this is a class AJAX scenario. So make an AJAX request
to get the image information, set that accordingly and when you change the img src to the httpHandler your image will load correctly and everything should be updated the way you want.