What is difference between HTML.TEXTBOX and HTML.TEXTBOXFOR?
Pradeep Yadav
Select an image from your device to upload
Both is use to create textbox but HTML.Textbox is loosly type means we can pass any name whatever we want i.e HTML.TextBox(“ABC”) but in case of HTML.TextBoxFor we must use the property which are available in particular model suppose you create one model like Customer and that contains 3 properties like Firstname , Lastname and MiddleName so in this case in our view we can use this 3 properties only , if we try to pass another property like HTML.TextBoxFor(m=>m.Age) will throws an error because we are trying to create textbox for age property which is not available in our model