views:

27

answers:

1

Hi, I have a basic question. I have created a MVC project. I made a change to the LogOn.aspx. Instead of HTML textbox control, I used an asp's text box control for the UserName text box. I tried to debug this, and i foung that the UserName parameter is being received as null in LogOn (POST)action. Can anyone please explain what's the reason behind this and how can i receive value using asp's standard web controls(instead HTML controls)?

Regards, ~kapil

A: 

A word of advice, though. If you're going to use the standard ASP.NET web controls, you're going to have to load much of the control tree overhead, the removing of which, has been the main point of why MVC patterns are adapted in .NET

Really, if you're using web controls, you might as well be using web forms, you honestly undermine a lot of the MVC gains. Do consider using regular html input fields, and create a helper if you want to add on special functionality.

David Hedlund