MSHTML

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ching-Lung

    #1

    MSHTML

    Hi,

    Does anyone know how to set/retrieve a value of a <TD>
    element through MSHTML in C#?

    Please advice, thanks!
    -CL
  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: MSHTML

    Ching-Lung,

    If you set a reference to the Microsoft.mshtm l interop assembly (it
    should be listed under the .NET tab when you add a reference), you will have
    access to the IHTMLTableCell interface, which you can use with the
    IHTMLTableRow interface, etc, etc.

    Hope this helps.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - mvp@spam.guard. caspershouse.co m

    "Ching-Lung" <cltjiong@hotma il.com> wrote in message
    news:12fd01c3a2 33$68e73300$a60 1280a@phx.gbl.. .[color=blue]
    > Hi,
    >
    > Does anyone know how to set/retrieve a value of a <TD>
    > element through MSHTML in C#?
    >
    > Please advice, thanks!
    > -CL[/color]


    Comment

    • Ching-Lung

      #3
      Re: MSHTML

      Nicholas,

      Any idea how to use those interfaces?

      IHTMLDocument3 doc = (IHTMLDocument3 )
      axWebBrowser1.D ocument;
      IHTMLElementCol lection col = doc.getElements ByName
      ("fName");
      IHTMLTableRow row = (IHTMLTableRow) col.item("fName ", 0);

      It always complains on the last statement. It says that
      unable to do the convertion.

      Also, I don't see a method/property on IHTMLTable... that
      can grab the value of <TD>.

      Please help.

      Thanks,
      -CL


      [color=blue]
      >-----Original Message-----
      >Ching-Lung,
      >
      > If you set a reference to the Microsoft.mshtm l[/color]
      interop assembly (it[color=blue]
      >should be listed under the .NET tab when you add a[/color]
      reference), you will have[color=blue]
      >access to the IHTMLTableCell interface, which you can[/color]
      use with the[color=blue]
      >IHTMLTableRo w interface, etc, etc.
      >
      > Hope this helps.
      >
      >
      >--
      > - Nicholas Paldino [.NET/C# MVP]
      > - mvp@spam.guard. caspershouse.co m
      >
      >"Ching-Lung" <cltjiong@hotma il.com> wrote in message
      >news:12fd01c3a 233$68e73300$a6 01280a@phx.gbl. ..[color=green]
      >> Hi,
      >>
      >> Does anyone know how to set/retrieve a value of a <TD>
      >> element through MSHTML in C#?
      >>
      >> Please advice, thanks!
      >> -CL[/color][/color]

      Comment

      Working...