Author Topic: Read Post Data submitted to ASP.Net Form  (Read 6494 times)

Offline admin

  • Administrator
  • Sr. Member
  • *****
  • Posts: 296
    • View Profile
Read Post Data submitted to ASP.Net Form
« on: August 20, 2011, 06:47:21 PM »
Read the Request.Form NameValueCollection and process your logic accordingly:
Code: [Select]
NameValueCollection nvc = Request.Form;string userName, password;
if (!string.IsNullOrEmpty(nvc["txtUserName"]))
{
 userName = nvc["txtUserName"];
}
if (!string.IsNullOrEmpty(nvc["txtPassword"]))
{
  password = nvc["txtPassword"];
}
//Process login
CheckLogin(userName, password);

... where "txtUserName" and "txtPassword" are the Names of the controls on the posting page.