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

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -