best way to get this data to the server?

Discussion in 'ASP .Net' started by Jim Hammond, Nov 5, 2003.

  1. Jim Hammond

    Jim Hammond Guest

    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
     
    Jim Hammond, Nov 5, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Christian H
    Replies:
    1
    Views:
    907
    Natty Gur
    Jul 29, 2003
  2. Alex
    Replies:
    1
    Views:
    1,791
    Rick Spiewak
    Apr 24, 2004
  3. John Salerno
    Replies:
    9
    Views:
    280
    Maxim Sloyko
    Sep 29, 2006
  4. tshad
    Replies:
    2
    Views:
    10,254
    Mark Rae [MVP]
    Mar 4, 2008
  5. oldyork90
    Replies:
    1
    Views:
    177
    Jeremy J Starcher
    Sep 10, 2008
Loading...

Share This Page