I left out the following button:
<asp:button id="Button3" runat="server" Text="TAKE PHOTO"></asp:button>
I enable it to call the JavaScript function TakePicture() with the following
code:
private void Page_Load(object sender, System.EventArgs e)
{
if (!IsPostBack)
Button3.Attributes.Add("onclick", "TakePicture()");
}
The init function is called once when the page is first displayed and then
each time the button is pressed.
"John Saunders" <john.saunders at surfcontrol.com> wrote in message
Jim Hammond said:
Here are the details...
Thanks,
<body MS_POSITIONING="GridLayout">
<OBJECT id="Object1"
classid="ClientSideAssembly_Video.dll#ClientSideAssembly_Video.VideoDisplay"
name="VideoControl" VIEWASTEXT>
</OBJECT>
<form id="Form3" name="Form1" method="post"
encType="multipart/form-data" runat="server" VIEWASTEXT>
<INPUT id="Hidden3" type="hidden" name="hidden1" runat="server">
<asp:image id="Image1" runat="server"></asp:image>
</form>
<script language="javascript">
function TakePicture()
{
VideoControl.TakePicture();
document.Form1.hidden1.value = VideoControl.jpgFile;
}
</script>
</body>
Jim,
I don't see where the TakePicture function is being called.
Are you saying that each time TakePicture is called the Init method of your
Object1 object is called, so that if you called it twice in a row during the
same request, you'd have Init called twice? Or are you saying that Init is
called once per request?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
John Saunders E-mail:
(e-mail address removed)
Internet Engineer
Tel: +1 508 621 3818
WWW:
www.surfcontrol.com
Fax: +1 508 621 3921
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SurfControl - the World's #1 Web & E-mail Filtering
Company