Click here to Skip to main content
15,903,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I'm facing a problem with read data from Java control in html to C#. Here is code in html:

HTML
<html>

  <head>
    <title>Title</title>
    <style type="text/css">
     <!--
     body { }
     #box1  { position:absolute; top:0px; left:0px; width: 150px; height: 35px; z-index:1;  }
     -->
    </style>
  </head>

  <body bgcolor="#FFFFFF">
     <div id="box1">
      <applet
      codebase ="../applets/"
      archive ="s7api.jar, s7util.jar, s7gui.jar, s7applets.jar"
      code ="de.siemens.simaticnet.itcp.applets.S7GetApplet.class"
      name ="Get_Applet_Name"
      mayscript
      width ="150"
      height ="35"
      hspace ="0"
      vspace ="0"
      align ="top">
        <param name="RACK" value="0">
        <param name="SLOT" value="0">
        <param name="LANGUAGE" value="en">
        <param name="BACKGROUNDCOLOR" value="0xFFFFFF">
        <param name="EDIT" value="true">
        <param name="FORMAT" value="Var_Name_1 = \F ">
        <param name="VARTYPE" value="0x08">
        <param name="VARCNT" value="1">
        <param name="VARAREA" value="0x84">
        <param name="VARSUBAREA" value="1">
        <param name="VAROFFSET" value="0">
        <param name="CYCLETIME" value="5000">
      </applet>
      
     </div>
  </body>

</html>


I want to get the applet control from html and read the value. However, I cannot read the applet control from my C# code.

Please help. Thank you.
Posted
Comments
Dave Kreskowiak 28-Jan-14 23:27pm    
Are you asking how to communicate with the running java code or are you asking how to parse the HTML and get the data from the <applet...> tag?
ZurdoDev 29-Jan-14 9:14am    
This is not clear. You have not shown any of your C# code. Please click the improve question link and add detail.

1 solution

If you want to parse the html markup, use this library :
HTML Agility Pack[^]
 
Share this answer
 
Comments
Rahul VB 29-Jan-14 12:40pm    
thanks:)
Ahmed Bensaid 30-Jan-14 3:40am    
You are welcome ;)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900