0

Please help me how can I write Bootstrap css class for @TextboxFor when its under @foreach loop

foreach (MasterTable item in Model._ListMasterTable)
{
     @Html.TextBoxFor(x => x._ListMasterTable, new { Value = item.Master_Name });
}

Thank you

2

1 Answer 1

2

This should do

foreach (MasterTable item in Model._ListMasterTable)
{
     @Html.TextBoxFor(x => x._ListMasterTable, new { Value = item.Master_Name, @class = "YOUR BOOTSTRAP CLASS HERE"});
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.