Populating text box after opening default browser with C#

B

beanz80

I was recently tasked with creating a .NET application that opens the
default browser to a specific webpage with the user name and password
populated. I have found the following code that uses C# to open IE
shown below

System.Diagnostics.Process process = new
System.Diagnostics.Process();
process.StartInfo.FileName = "http://mywebsite.com";
process.Start();

Is there a way to pass text to the username and password to the
browser before running process.Start() or should I attempt to run a VB
Script after the browser has opened?

Thanks
 
I

Ignacio Machin ( .NET/ C# MVP )

I was recently tasked with creating a .NET application that opens the
default browser to a specific webpage with the user name and password
populated. I have found the following code that uses C# to open IE
shown below

System.Diagnostics.Process process = new
System.Diagnostics.Process();
process.StartInfo.FileName = "http://mywebsite.com";
process.Start();

Is there a way to pass text to the username and password to the
browser before running process.Start() or should I attempt to run a VB
Script after the browser has opened?

Thanks

Hi,

Not that I know of. at least no in the way you are doing it.
If you use a WebBrowser control then you can populate the controls as
you want.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top