Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add new css class in @Html.TextBox mvc4

Tags:

I have used following code to add css class with @Html.TextBox but this is only working for @Html.TextBoxFor and not for @Html.TextBox.

@Html.TextBox("ticket_new_attachment_attributes_0_description", new { @class= "bigfield"}) 

What am I missing?

like image 242
Hemant Soni Avatar asked Apr 18 '13 13:04

Hemant Soni


1 Answers

Try this

@Html.TextBox("ticket_new_attachment_attributes_0_description", null, new { @class= "bigfield"}) 
like image 76
ssilas777 Avatar answered Oct 03 '22 05:10

ssilas777