How to make multiline text box in MVC

If you are working on mvc and you got the scenario to make Multiline text box, where user can enter the long text.

Then you can do like this

Step 1 : Take the @html.TextAreaFor html helper

Step 2: Increase the height and weight of TextArea like this

@Html.TextAreaFor(model => model.Answer,5, 55, null)

Note : Here Model.Answer is the part of my model class.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.