473,725 Members | 2,193 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

using client-side component keeps calling component's init

The following code uses a client-side component to capture an image from the
camera on the client system.

The problem is that the init function (in ClientSideAssem bly_Video.dll) is
called once when the page is first displayed and then each time the button
is pressed.

I'm guessing that the component is being instantiated each time. Is there
any way to keep using the same instance?

Thanks,

Jim
<body MS_POSITIONING= "GridLayout ">
<OBJECT id="Object1"

classid="Client SideAssembly_Vi deo.dll#ClientS ideAssembly_Vid eo.VideoDisplay "
name="VideoCont rol" VIEWASTEXT>
</OBJECT>
<form id="Form3" name="Form1" method="post"
encType="multip art/form-data" runat="server" VIEWASTEXT>
<INPUT id="Hidden3" type="hidden" name="hidden1" runat="server">
<asp:image id="Image1" runat="server"> </asp:image>
<asp:button id="Button3" runat="server" Text="TAKE
PHOTO"></asp:button>
</form>
<script language="javas cript">
function TakePicture()
{
VideoControl.Ta kePicture();
document.Form1. hidden1.value = VideoControl.jp gFile;
}
</script>
</body>
I enable the button to call the JavaScript function TakePicture() with the
following
C# code in the web form:

private void Page_Load(objec t sender, System.EventArg s e)
{
if (!IsPostBack)
Button3.Attribu tes.Add("onclic k", "TakePicture()" );
}

Nov 17 '05 #1
1 1470

The following code uses a client-side component to capture an image from the
camera on the client system.

The problem is that the init function (in ClientSideAssem bly_Video.dll) is
called once when the page is first displayed and then each time the button
is pressed.

I'm guessing that the component is being instantiated each time. Is there
any way to keep using the same instance?

This happens even if I comment out the statements inside the JavaScript
function.

Thanks,

Jim
<body MS_POSITIONING= "GridLayout ">
<OBJECT id="Object1"

classid="Client SideAssembly_Vi deo.dll#ClientS ideAssembly_Vid eo.VideoDisplay "
name="VideoCont rol" VIEWASTEXT>
</OBJECT>
<form id="Form3" name="Form1" method="post"
encType="multip art/form-data" runat="server" VIEWASTEXT>
<INPUT id="Hidden3" type="hidden" name="hidden1" runat="server">
<asp:image id="Image1" runat="server"> </asp:image>
<asp:button id="Button3" runat="server" Text="TAKE
PHOTO"></asp:button>
</form>
<script language="javas cript">
function TakePicture()
{
VideoControl.Ta kePicture();
document.Form1. hidden1.value = VideoControl.jp gFile;
}
</script>
</body>
I enable the button to call the JavaScript function TakePicture() with the
following
C# code in the web form:

private void Page_Load(objec t sender, System.EventArg s e)
{
if (!IsPostBack)
Button3.Attribu tes.Add("onclic k", "TakePicture()" );
}


Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5942
by: Frank | last post by:
Hi, is there a way to use XSL to compare two XML files to verify if a "record" in an XML file has changed of parent in another XML file ? I am trying to implement a template in an XSL stylesheet that would be able to compare the two files below and indicate if a client has changed of category (ex.: from "corp" to "prvt"). Any help would be gladly appreciated, I am desparatly trying to find a
4
6517
by: nospam_stunter2001 | last post by:
Hi folks, I'm new here and am a neophyte Access 2000 user/developer. A year ago, I barely knew what Access was. I was asked by the people that pay us to begin keeping certain data about the children's crisis program I manage. After a couple of years doing this by hand on paper (Yikes!), I decided that this was ridiculous. Out of neccessity, I had to learn Access and develop a database to track clients and services. So what I know, I've...
6
4124
by: roger beniot | last post by:
I have a program that launches multiple threads with a ThreadStart method like the following (using System.Net.Sockets.Socket for UDP packet transfers to a server): ThreadStart pseudo code: Connect Receive response Send Connect ACK
2
13006
by: Kumar | last post by:
Hi, I am trying to develop FTP client application using c#. Our application functinality should be like this: 1.our client uploads files,folders to our ftp server for every 20 minutes. 2.At the end of operation they will put one confirmation file (say Done.txt) to conirm their upload operation is completed in that cycle.
0
1108
by: Glich via DotNetMonster.com | last post by:
#using <mscorlib.dll> #using <System.dll> #include "stdlib.h" #include "stdio.h" using namespace System; using namespace System::Text; using namespace System::IO; using namespace System::Net;
0
1569
by: dinoo | last post by:
Can some body help me out? I am trying to use client certificates in a Webservice. But some how i am not able to make it. I went through the msdn resources but i think some one needs to help me out. I am using IIS 5.1 on Windows XP professional. I am able to setup the SSL on my webserver using the 14 day trial period certificate. I setup the virtual directory using SSL connection required and Required Client certificates. I want to know...
1
8384
by: Chin Fui | last post by:
I am now doing my final year project using VB.NET. The project is about implement a multiplayer network game. But now I am stuck in the connection part, no idea in how to start to write the network application. Hope anyone can give me any hint or help... Thank you... Chin Fui
0
10710
by: mahesh anasuri | last post by:
Hi all, I am new to this mailing list. Thankful if any one is using curl/linux version to and worked on Https. I have created certificates (PEM format) for client and server using openSSL. I am using Apache server/Linux platform and started server with "server certificate". I configured server to listen HTTPS service at port 443. I downloaded download.txt correctly from server using command as $curl --cacert cacert.pem ...
2
11514
by: syntego | last post by:
We commonly use triggers to log changes to our main tables to historical log tables. In the trigger, we create a concatenated string of the old values by casting them as follows: CAST(O.MYDATE AS CHAR(30)) When directly updating date fields in the main table, the logged value gets saved in the format YYYY-MM-DD as expected.
14
7758
by: ml_sauls | last post by:
I've built a system to enter and manage purchase orders. This is in use by >10 clients. Some use it in Access 97, most are in A2k. About half use it through a Citrix implementation. It is separated into a front end and 3 back ends (1 network for permanent storage, 1 local for temp storage, and 1 local for storage for particular user). One particular form is failing for a single client (Access 2000, using Citrix). This form is a form...
0
8888
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8752
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9401
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9176
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9113
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8097
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6011
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4519
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2157
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.