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

Sachin SinghRank #66 · 26.2K reputationPosted Jun 12, 2021, 4:10 AM EDT
Jignesh KumarRank #91 · 22.9K reputationPosted Jun 12, 2021, 12:41 AM EDT