html - how can i pass the info in a text area to a c# method? -


have html this

<form> user: <input type="text" name="firstname"><br> pw  : <input type="text" name="lastname"><br> <input type="submit" value="submit"> </form> 

and c# method evaluate

 string uname = "bob";  string pass = "bigballs";    public void authenticate(string username, string pw)  {      if (username == uname && pw == pass)      {          /// go admin area      }  } 

what want know how can server method access form data?

like in asp.net

<form> user: <input type="text" name="firstname" id= "firstname"><br> pw  : <input type="text" name="lastname" id = "lastname"><br> <input type="submit" value="submit"> </form>   string strfirstname =  request.form["firstname"]; string strlastname =  request.form["lastname"]; 

Comments