How to let the application automatically press enter after opening a website.

XDfox 21 Reputation points
2022-09-14T02:10:21.11+00:00

Hi I am using C# to open a website and I would like to let the application press enter after opening the website. Is anyone know how to solve this problem?

      System.Diagnostics.Process.Start(new ProcessStartInfo  
        {  
            FileName = OpenWebsite,  
            UseShellExecute = true  
        });  

        System.Diagnostics.Process process = new System.Diagnostics.Process();  

        process.StartInfo.UseShellExecute = true;  
        process.StartInfo.FileName = OpenWebsite;  

        process.Start();  
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,818 questions
Windows Server Management
Windows Server Management
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Management: The act or process of organizing, handling, directing or controlling something.
434 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 44,206 Reputation points
    2022-09-19T07:57:36.373+00:00

    Hello there,

    If you're talking about automatically entering an Enter key to trigger a submit event, you can use this,

    $("#formID").submit();
    To trigger this event after a button has been pressed, try this:

    $("#buttonID").click(function() {
    $("#formID").submit(); // submits form
    });

    -------------------------------------------------------------------------------------------------------

    --If the reply is helpful, please Upvote and Accept it as an answer--

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.