ASP.NET MVC: Html.Textbox

If you have a model for your view you can do

Html.TextBox("Title")

Which automaticly (through reflection) fills in the Model.Title value as value, so you don’t need to do

Html.TextBox("Title", Model.Title)

2 thoughts on “ASP.NET MVC: Html.Textbox

  1. hi,
    i have used the syntax mentioned above to create a textbox for a data entry form in one of my asp.net mvc project. the page has some values coming from the database as well. does this can be a issue for not rendering the textboxes in the page?
    thanks

  2. I am not sure if I understand your problem correctly (you can contact my on my email if you need help).

    Is your data in the model?

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>