How to save textboxfor value in sql using c#
Query in the below:
View:
<td> @{ var SbTotal = OutOfhund + OutOfhundBeh + OutOfhundFun; } @Html.DisplayFor(item => SbTotal) @Html.TextBoxFor(item => item.Total, new { @Value = SbTotal, @readonly = "readonly" }) @*@(OutOfhund + OutOfhundBeh + OutOfhundFun)*@ </td>
Controller:
string query3 = "insert into AssesmentModelDetail(Total=)values('"+item.Total+"')"