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 FileSystemWatch er to capture
and serve a .jpg to the Image control in the UpdatePanel. The UpdatePanel
refresh is triggered by an AsyncPostBackTr igger 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:ScriptMana ger ID="ScriptManag er1" runat="server"
EnableViewState ="false" EnablePartialRe ndering="true">
</asp:ScriptManag er>
<asp:Timer ID="Timer1" OnTick="Timer1_ Tick" runat="server"
Interval='<%# GetTimerInterva l() %>' />
<asp:UpdatePane l ID="UpdatePanel 2" runat="server" EnableViewState =
"false" UpdateMode="Alw ays">
<ContentTemplat e>
<div align="center">
Last Update:
<asp:Label ID="dtMessage" runat="server"> </asp:Label>
</div>
</ContentTemplate >
</asp:UpdatePanel >
<asp:UpdatePane l ID="UpdatePanel 1" runat="server" EnableViewState =
"false" UpdateMode="Alw ays">
<ContentTemplat e>
<div align="center">
<asp:Image ID="Image1" runat="server"
BackColor="DimG ray" OnDataBinding=" OnDataBinding" ImageUrl='<%# GetData()
%>' />
</div>
</ContentTemplate >
</asp:UpdatePanel >
</form>
</body>
where GetData() returns the string url from the FileSystemWatch er's
OnCreated event.
Any advice on this matter would be greatly appreciated.
Thank you,
Steven
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 FileSystemWatch er to capture
and serve a .jpg to the Image control in the UpdatePanel. The UpdatePanel
refresh is triggered by an AsyncPostBackTr igger 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:ScriptMana ger ID="ScriptManag er1" runat="server"
EnableViewState ="false" EnablePartialRe ndering="true">
</asp:ScriptManag er>
<asp:Timer ID="Timer1" OnTick="Timer1_ Tick" runat="server"
Interval='<%# GetTimerInterva l() %>' />
<asp:UpdatePane l ID="UpdatePanel 2" runat="server" EnableViewState =
"false" UpdateMode="Alw ays">
<ContentTemplat e>
<div align="center">
Last Update:
<asp:Label ID="dtMessage" runat="server"> </asp:Label>
</div>
</ContentTemplate >
</asp:UpdatePanel >
<asp:UpdatePane l ID="UpdatePanel 1" runat="server" EnableViewState =
"false" UpdateMode="Alw ays">
<ContentTemplat e>
<div align="center">
<asp:Image ID="Image1" runat="server"
BackColor="DimG ray" OnDataBinding=" OnDataBinding" ImageUrl='<%# GetData()
%>' />
</div>
</ContentTemplate >
</asp:UpdatePanel >
</form>
</body>
where GetData() returns the string url from the FileSystemWatch er's
OnCreated event.
Any advice on this matter would be greatly appreciated.
Thank you,
Steven
Comment