Click here to Skip to main content
15,889,116 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello,
I'm trying to create a form where I will be able to type the url and when I click on the button that it opens that link in Chrome. I achieved that by this code :

private void button1_Click(object sender, EventArgs e)
       {
           var prs = new ProcessStartInfo("new_chrome.exe");
           prs.Arguments = textBox1.Text;
           Process.Start(prs);
       }

Now I want to be able after opening of some link to click on the button on that web page by clicking on the button in my C# program interface.
Can anyone help me?
Thank you

What I have tried:

I tried getting the id's from webpage, classes etc. I guess it would be easier to achieve it using C# webbrowser, but for me it's important to everything happens in chrome.
Posted
Updated 26-Apr-16 15:13pm

1 solution

You are totally lost. Process.Start is the server-side code; it will start Chrome… on the server side. Actually, there is no Chrome there. If it was there, or if you wanted to use the WebBrowser control, who would look at a Web page on the server side? Someone from a cleaning team removing dust from countless racks with blade computers? Absurd, total.

This is not what is called "Web application" or "Web site". Web products are developed to be used through any non-nonsense Web browser, not just Chrome. No part of technology assumes that Chrome is even installed. The problem of opening of a Web page is as simple as having an anchor in HTML. That's it.

If you don't understand it, then sorry; it won't make any sense to explain it for you. This is not a proper place for explaining things starting from the explanation of what a computer does, what software does (it's very likely that you have no clue) and what Web does (you most certainly have no clue). Please, if you want, learn the basics and, if you have any problems, come back.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900