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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. How to submit form?

How to submit form?

Scheduled Pinned Locked Moved C#
tutorialquestion
2 Posts 2 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.
  • V Offline
    V Offline
    VahagnSC
    wrote on last edited by
    #1

    Hello everybody!!!! I can find requisite form in my webbrowser.document. Does anybody know how to submit that? Please anybody answer me!!!!

    H 1 Reply Last reply
    0
    • V VahagnSC

      Hello everybody!!!! I can find requisite form in my webbrowser.document. Does anybody know how to submit that? Please anybody answer me!!!!

      H Offline
      H Offline
      Hessam Jalali
      wrote on last edited by
      #2

      I'm not sure understand what you means but if you filled some fields and want to click on a link or button to send it it would be like this: this.webBrowser.Document.All["submit"].InvokeMember("click"); submit is the button name and click is the method however sometimes it does not work correctly. for that you can use unmanaged HTMLDocument object domElement = this.webBrowser.Document.All["submit"].DomElement; mshtml.IHTMLElement hElemnt = (mshtml.IHTMLElement)domElement; hElemnt.click(); to read a field you can use id of it (just like name or id of a button) and use GetAttribute() method foreach (HtmlElement he in this.webBrowser.Document.All["verb[]"].All) MessageBox.Show(he.GetAttribute("value")); to write a field you can use id of it (just like name or id of a button) and use SetAttribute() method for text areas you must use InnerText property instead of GetAttribute() and SetAttribute() Method. I hope the post going to be useful good luck

      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