J
Jim Hammond
I have figured out how to create a .NET assembly that can run on the client
side and interact with browser controls (much like ActiveX only a pure .NET
solution). This test assembly reads a file from the client's computer and
populates an HTML text box with the results. However, I still have not
figured out the proper way to get that data to my C# code on the server.
Also, I wrote the following code by hand. I have not yet figured out how to
do this using VS and server controls.
-----------
<body MS_POSITIONING="GridLayout">
<OBJECT id="myControl1" height="288" width="312"
classid="ClientSideAssembly.dll#ClientSideAssembly.myControl"
name="myControl1" VIEWASTEXT>
</OBJECT>
<form id="Form1" name="Form1" method="post" runat="server" VIEWASTEXT>
<input type="text" name="txt">
<input onclick="doScript();" type="button" value="Click me">
</form>
<script language="javascript">
// successfully gets the text that the client-side assembly
// read from a client's file
function doScript()
{
Form1.txt.value = myControl1.FileText;
}
</script>
</body>
-------------
Anyone who is interested in how I got a client-side assembly to work will
have trouble finding helpful material, so I have included links to the
material that I used:
http://www.c-sharpcorner.com/Code/2003/March/ActiveXInNet.asp
http://www.windevnet.com/documents/s=7641/win0302h/0302h.htm?temp=2n3w--hKCA
side and interact with browser controls (much like ActiveX only a pure .NET
solution). This test assembly reads a file from the client's computer and
populates an HTML text box with the results. However, I still have not
figured out the proper way to get that data to my C# code on the server.
Also, I wrote the following code by hand. I have not yet figured out how to
do this using VS and server controls.
-----------
<body MS_POSITIONING="GridLayout">
<OBJECT id="myControl1" height="288" width="312"
classid="ClientSideAssembly.dll#ClientSideAssembly.myControl"
name="myControl1" VIEWASTEXT>
</OBJECT>
<form id="Form1" name="Form1" method="post" runat="server" VIEWASTEXT>
<input type="text" name="txt">
<input onclick="doScript();" type="button" value="Click me">
</form>
<script language="javascript">
// successfully gets the text that the client-side assembly
// read from a client's file
function doScript()
{
Form1.txt.value = myControl1.FileText;
}
</script>
</body>
-------------
Anyone who is interested in how I got a client-side assembly to work will
have trouble finding helpful material, so I have included links to the
material that I used:
http://www.c-sharpcorner.com/Code/2003/March/ActiveXInNet.asp
http://www.windevnet.com/documents/s=7641/win0302h/0302h.htm?temp=2n3w--hKCA