Skip to content

How to fill in html textbox from (c# )windows application

mrlingam

Asked Apr 30, 2012, 3:51 AM EDT4 answers
Share
LinkedInX
I would like to do the following from a windows application:

    1.Open a browser and navigate to a URL.
    2.When i am at the correct URL in my browser window, i want to fill in data in the html textboxes on that page from my windows application.
     3.When that is  done i want to press a button.

 Google Chrome and Mozilla Firefox is currently used in my browser Window.
 Internet Explorer Web Browser is not used in  browser Window.

Thanks In Advance.

4 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Senthilkumar
    0
    Hi,

    The logic has to be implemented in the html page.

    when you redirect from your application then you need to pass the value of the text box in the query string.

    www.sample.com/pages/default.aspx?val=sample

    In the html/.aspx page you need to get the value from the query string and assign it to the textbox in the page load.

    Hope this will help you.
    0
  • 0
    .
     The URL (https://www.exple.com/login.html ) had already opened in anyone web browsers such as Mozilla Firefox and Google Chrome..

    It Consists of Two Textboxes such as Username and Password .

    I Want to fill in data in Username & Password Textbox on Google Chrome/Mozilla Firefox Web Browser.The Input data is taken from C# Windows Application to URL  When Clicked Submit Button in Windows Application.

    Thanks in Advance.
    0
  • Senthilkumar
    0
    Hi,

    thats what i explained you.

    While redirect the url, you need to pass the query string with the user name and password.

    then that html/.aspx page should have some logic to get the user name and password from the query string and assign it the appropriate text box control.
    0
  • 0
    Query String Concept is not possible.Because The URL (https://www.exple.com/login.html ) had already opened on anyone web browsers such as Mozilla Firefox and Google Chrome in local System.

    Thanks in Advance.
    0