mohaammed talha

mohaammed talha

  • NA
  • 445
  • 52.4k

How to save textborfor value in sql using c#

Jun 12 2021 4:26 AM

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+"')"


Answers (2)