Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing variable via URL?

Status
Not open for further replies.

RascaPR

Technical User
Oct 27, 2007
26
US
Hello all,

How can I edit this code, so that I am able to append the variables Username and Password:

Code:
Username = this.txtPilotname.Text;
Password = this.txtPassword.Text;

System.Net.WebClient Client = new System.Net.WebClient();
Client.DownloadFile("[URL unfurl="true"]http://www.mysite.com/verification.php?username=Username&password=Password",[/URL] @"C:\verification.php");

I tried the above but it's not passing the variables. Thanks for any help...
 
Code:
System.Net.WebClient Client = new System.Net.WebClient();
Client.DownloadFile("[URL unfurl="true"]http://www.mysite.com/verification.php?username="[/URL] + Username + "&password=" + Password, @"C:\verification.php");
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top