How to pass Variable value in @html.textboxfor using asp.net mvc
Below in the query:
@{
var SbTotal =5;
}
@Html.TextBoxFor(item => item.Total, new { id = "materialCostInput" + SbTotal })
@(OutOfhund + OutOfhundBeh + OutOfhundFun)
How to pass Variable value in @html.textboxfor using asp.net mvc
Below in the query:
@{
var SbTotal =5;
}
@Html.TextBoxFor(item => item.Total, new { id = "materialCostInput" + SbTotal })
@(OutOfhund + OutOfhundBeh + OutOfhundFun)
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sachin SinghPosted Jun 11, 2021, 12:04 PM
Rajeev KumarPosted Mar 14, 2023, 10:27 AM
Try this -
@Html.TextBoxFor(item => item.Totel, new { @Value =SbTotal })
Satya KarkiPosted Jun 11, 2021, 12:06 PM
Hi
Simply try this
Rijwan AnsariPosted Jun 11, 2021, 12:02 PM
mohaammed talhaPosted Jun 11, 2021, 11:09 AM
mohaammed talhaPosted Jun 11, 2021, 10:08 AM
Sachin SinghPosted Jun 11, 2021, 9:55 AM