1

I have a web portal that I'm trying to pass information to another website. When the user clicks on a link I'd like to load the new web page and stuff the two form fields with information then SUBMIT to automate a process.

I found this: Autofill 2 Fields on a Web Page with C#

However, this assumes I open a new webbrowser control but instead I want to use the current web session.

Is this possible or is there another way to accomplish this?

Thanks!

2
  • Can you modify the second web page? Commented May 16, 2013 at 7:15
  • No unfortunately not... Commented May 16, 2013 at 12:13

1 Answer 1

1

Use WebClient class. Place it inside onclick event of your link.

var client = new System.Net.WebClient();
string url = "www.mysite.com?a=xyz&b=123";

cli.Downloadstring(url);
Sign up to request clarification or add additional context in comments.

1 Comment

I'm not sure this is what I'm looking for..? The site I want to fill in the form is outside of my control. A user goes into my portal clicks on a link (MVC web site) pointing to the outside website. That site is where I want to fill in two textboxes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.