Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form method="post" action="/home/index">
- Username:
- <%= Html.TextBox("UserName")%>
- Password:
- <%= Html.TextBox("Password")%>
- <input id="login" type="button" value="Login" />
- <input id="Submit1" type="submit" value="submit" />
- </form>
- [AcceptVerbs(HttpVerbs.Post)]
- public ActionResult Index(string UserName, string Password)
- {
- //UserName and Password are null! Why?
- }
- [AcceptVerbs(HttpVerbs.Post)]
- public ActionResult Index([Bind]string UserName, [Bind]string Password)
- {
- //UserName and Password are null! Why?
- }
- <form method="post" action="/company/update/3">
- Name:
- <%= Html.TextBox("Company.Name")%>
- FEIN:
- <%= Html.TextBox("FEIN")%>
- <input type="submit" value="submit" />
- </form>
- [AcceptVerbs(HttpVerbs.Post)]
- public ActionResult Index(int id, Company company)
- {
- //Company.FEIN is null!
- }
Add Comment
Please, Sign In to add comment