Guest User

Untitled

a guest
Jun 21st, 2018
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. <form method="post" action="/home/index">
  2. Username:
  3. <%= Html.TextBox("UserName")%>
  4. Password:
  5. <%= Html.TextBox("Password")%>
  6. <input id="login" type="button" value="Login" />
  7. <input id="Submit1" type="submit" value="submit" />
  8. </form>
  9.  
  10. [AcceptVerbs(HttpVerbs.Post)]
  11. public ActionResult Index(string UserName, string Password)
  12. {
  13. //UserName and Password are null! Why?
  14. }
  15.  
  16. [AcceptVerbs(HttpVerbs.Post)]
  17. public ActionResult Index([Bind]string UserName, [Bind]string Password)
  18. {
  19. //UserName and Password are null! Why?
  20. }
  21.  
  22. <form method="post" action="/company/update/3">
  23. Name:
  24. <%= Html.TextBox("Company.Name")%>
  25. FEIN:
  26. <%= Html.TextBox("FEIN")%>
  27.  
  28. <input type="submit" value="submit" />
  29. </form>
  30.  
  31. [AcceptVerbs(HttpVerbs.Post)]
  32. public ActionResult Index(int id, Company company)
  33. {
  34. //Company.FEIN is null!
  35. }
Add Comment
Please, Sign In to add comment