Results 1 to 4 of 4

Thread: [RESOLVED] HtmlDocument.AppendChild at specific place?

  1. #1

    Thread Starter
    Hyperactive Member Cyb3rH4Xter's Avatar
    Join Date
    May 2009
    Location
    Sweden
    Posts
    449

    Resolved [RESOLVED] HtmlDocument.AppendChild at specific place?

    I have a webpage, which contains a table. I would like to add another row to that table. I found the AppendChild method, but what I understand, it only appends at the bottom of the body.

    How can I insert an Element, or raw Html at a specific place nicely?

  2. #2
    Frenzied Member KGComputers's Avatar
    Join Date
    Dec 2005
    Location
    Cebu, PH
    Posts
    2,024

    Re: HtmlDocument.AppendChild at specific place?

    Hi,

    I pretty guess you mean HtmlElement.Appendchild() right?

    Are you using the webbrowser control for this?

    How about inserting an element based on string manipulation, like
    getting the index of the html tag in a string variable,then appending
    the element based on that specified index..Is this possible?


    Greg
    CodeBank: VB.NET & C#.NET | ASP.NET
    Programming: C# | VB.NET
    Blogs: Personal | Programming
    Projects: GitHub | jsFiddle
    ___________________________________________________________________________________

    Rating someone's post is a way of saying Thanks...

  3. #3

    Thread Starter
    Hyperactive Member Cyb3rH4Xter's Avatar
    Join Date
    May 2009
    Location
    Sweden
    Posts
    449

    Re: HtmlDocument.AppendChild at specific place?

    Oh yeah of course, my fault. It should be HtmlElement.Appendchild()
    Yes I am using a webbrowser control.

    Your idea with the index would surely work, though since you reminded me that it was HtmlElement I reminded myself that I could just find the right element (the table) since I want the row at the bottom in the table anyway

    EDIT: I succeeded adding the element, but the page shows no change?

    EDIT2: The page automatically adds a bit of URL to all href elements....I give up.
    Last edited by Cyb3rH4Xter; Dec 1st, 2011 at 12:11 PM.

  4. #4
    Frenzied Member KGComputers's Avatar
    Join Date
    Dec 2005
    Location
    Cebu, PH
    Posts
    2,024

    Re: [RESOLVED] HtmlDocument.AppendChild at specific place?

    Glad to enlighten you up...

    Greg
    CodeBank: VB.NET & C#.NET | ASP.NET
    Programming: C# | VB.NET
    Blogs: Personal | Programming
    Projects: GitHub | jsFiddle
    ___________________________________________________________________________________

    Rating someone's post is a way of saying Thanks...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width