How to make multiline text box in asp.net MVC


If you are working on asp.net 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.

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: