Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. filling a form on internet !

filling a form on internet !

Scheduled Pinned Locked Moved C#
csharpcomhelpquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sajjy
    wrote on last edited by
    #1

    hi guys , i`m new in C# and now have a problem :) i wanna open a web page , then get it`s form (my perpose page has 1 form) then fill the form , and click the button ! :-D the textbox of user name , is named : "e5ba6b5" see , i did this :

           webBrowser1.Navigate("http://mysite.com");
                HtmlElementCollection htm = webBrowser1.Document.Forms;
                HtmlElementCollection user = htm.GetElementsByName("e5ba6b5");
    

    is it true ?! and how should i fill username and click the button ?! :wtf:

    N J 2 Replies Last reply
    0
    • S sajjy

      hi guys , i`m new in C# and now have a problem :) i wanna open a web page , then get it`s form (my perpose page has 1 form) then fill the form , and click the button ! :-D the textbox of user name , is named : "e5ba6b5" see , i did this :

             webBrowser1.Navigate("http://mysite.com");
                  HtmlElementCollection htm = webBrowser1.Document.Forms;
                  HtmlElementCollection user = htm.GetElementsByName("e5ba6b5");
      

      is it true ?! and how should i fill username and click the button ?! :wtf:

      N Offline
      N Offline
      Natural_Demon
      wrote on last edited by
      #2

      http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvb/thread/a85407b6-c95a-4b80-849f-cae03aedaf92[^] maybe this helps. use a visualB to visual C# translator http://www.developerfusion.com/tools/convert/vb-to-csharp/[^]

      Bad = knowing 2 much

      1 Reply Last reply
      0
      • S sajjy

        hi guys , i`m new in C# and now have a problem :) i wanna open a web page , then get it`s form (my perpose page has 1 form) then fill the form , and click the button ! :-D the textbox of user name , is named : "e5ba6b5" see , i did this :

               webBrowser1.Navigate("http://mysite.com");
                    HtmlElementCollection htm = webBrowser1.Document.Forms;
                    HtmlElementCollection user = htm.GetElementsByName("e5ba6b5");
        

        is it true ?! and how should i fill username and click the button ?! :wtf:

        J Offline
        J Offline
        jbc1
        wrote on last edited by
        #3

        Do you have to use C# for this? I do things like this a lot, as I write test automation suites for websites. I would use the AutoITv3 scripting language, http://www.autoitscript.com. It should take you all of ten minutes to do something simple like this, and the scripts compile directly .exe. Take a look :)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups