VS 2010 click element by id-VBForums
Results 1 to 5 of 5

Thread: click element by id

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2012
    Posts
    7

    click element by id

    hello everone!
    Is possible click element by id in asp.net ?
    if is, can you give me an example?
    thx in advance for feedback!

  2. #2
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    3,791

    Re: click element by id

    I don't understand what you want.
    Sorry.
    Slow as hell.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2012
    Posts
    7

    Re: click element by id

    topic title says everything!

  4. #4
    Frenzied Member MattP's Avatar
    Join Date
    Dec 2008
    Location
    WY
    Posts
    1,227

    Re: click element by id

    Quote Originally Posted by juraska View Post
    topic title says everything!
    No it doesn't. Give us some example code depicting your problem and exactly what you expect it to do.
    This pattern in common to all great programmers I know: they're not experts in something as much as experts in becoming experts in something.

    The best programming advice I ever got was to spend my entire career becoming educable. And I suggest you do the same.

  5. #5

    Thread Starter
    New Member
    Join Date
    Jan 2012
    Posts
    7

    Re: click element by id

    in vb i know how do to that.

    here's how i do in vb

    with this code and webbrowser

    Code:
     Dim allelements As HtmlElementCollection = WebBrowser1.Document.All
    
            For Each webpageelement As HtmlElement In allelements
    
                If webpageelement.GetAttribute("id") = "count-down" Then
    
                    webpageelement.InvokeMember("click")
    
                End If
    
            Next
    I click this page element


    HTML Code:
    <div id="count-down"><h2><a href="redirect.php?code=5rX8fe">Click here to continue</a></h2></div>
    As you can see, i try click element by id, in vb it's works fine, but in asp, i just not have idea how to do that
    thanks for feekbacks

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.