Greetings,
This project, among other things, requires:
1. the ability to capture a screen size image from a directory every x
seconds (x= 1-5) and display this image to a publicly addressable web form
without any screen flicker.
Basically, we have a device that captures frames from one PC (1) and saves
them to a directory on a different PC (2). The web app will be on the number
2 PC.
So far, I have created a web site with Ajax UpdatePanels,an Image control
to display the image from the directory, and a FileSystemWatcher to capture
and serve a .jpg to the Image control in the UpdatePanel. The UpdatePanel
refresh is triggered by an AsyncPostBackTrigger and a Timer. This works,
but because the image is large ( I guess), the screen flickers between image
loads. My question is: is there a better way to do this?
The aspx looks like this:
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"
EnableViewState="false" EnablePartialRendering="true">
</asp:ScriptManager>
<asp:Timer ID="Timer1" OnTick="Timer1_Tick" runat="server"
Interval='<%# GetTimerInterval() %>' />
<asp:UpdatePanel ID="UpdatePanel2" runat="server" EnableViewState=
"false" UpdateMode="Always">
<ContentTemplate>
<div align="center">
Last Update:
<asp:Label ID="dtMessage" runat="server"></asp:Label>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" EnableViewState=
"false" UpdateMode="Always">
<ContentTemplate>
<div align="center">
<asp:Image ID="Image1" runat="server"
BackColor="DimGray" OnDataBinding="OnDataBinding" ImageUrl='<%# GetData()
%>' />
</div>
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
where GetData() returns the string url from the FileSystemWatcher's
OnCreated event.
Any advice on this matter would be greatly appreciated.
Thank you,
Steven