Posting Data From HTML to ASPXPublished: Jul 06, 2010 20:32:00
Physical Link: Posting Data From HTML to ASPX
Recently I had a need to have a web site post credentials to another web site. The first site was standard HTML and the second site was DotNet (ASP.NET).
In this example, we will be passing a user name and password to another site.
Sending Web Site
In your sending website, you will need a log in panel similar to the one below.
Receiving Web Site
In the form load of your DotNet (ASP.NET) site, you will need the following code to get the values from the request object and then pass to your log in routine.
NameValueCollection nvc = Request.Form;
string userName = "";
string password = "";
userName = nvc["txtUserName"];
password = nvc["txtPassword"];
The post Posting Data From HTML to ASPX appeared first on Software Developer In London.
Author: Andrew Pallant
Categories: ASP, C#, C-Sharp, Developement, How To, Web, asp.net, development, HTML