News:

To still receiving newsletters from us please subscribe to our Newsletters:
http://tech.groups.yahoo.com/group/developers-Heaven/

Main Menu

Read Post Data submitted to ASP.Net Form

Started by admin, August 20, 2011, 12:47:21 PM

Previous topic - Next topic

admin

Read the Request.Form NameValueCollection and process your logic accordingly:
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.