i have a page in that i have strongly typed controls of the model and loosely typed controls not related to this model i want to send the data to controller at a time how should i
below is my code
Appoitment Details :
@Html.LabelFor(model => model.PatRegId)

@Html.EditorFor(model => model.PatRegId, new { htmlAttributes = new { @class = "form-control", @list = "PatRegId", @id = "patregid", @autocomplete = "false" } })
@**@
@foreach (var v in ViewBag.patientreglist)
{
}
@Html.Label("AppointmentTypeId")

@Html.DropDownList("AppointmentTypeId", @ViewBag.appoitmenttype as SelectList, "SELECT", new { @Class = "form-control" })
@Html.ValidationMessage("AppointmentTypeId", "", new { @class = "text-danger" })
@Html.Label("AppointmentDate")

@Html.Editor("AppointmentDate", new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessage("AppointmentDate", "", new { @class = "text-danger" })
@Html.LabelFor(model => model.PaymentModeId)

@Html.TextBoxFor(model => model.PaymentModeId, new { Class = "form-control" })
@Html.LabelFor(model => model.PaidAmount)

@Html.TextBoxFor(model => model.PaidAmount, new { Class = "form-control" })
@Html.LabelFor(model => model.DueAmount)

@Html.TextBoxFor(model => model.DueAmount, new { Class = "form-control" })
@Html.LabelFor(model => model.PaidDate)

@Html.TextBoxFor(model => model.PaidDate, new { Class = "form-control date" })
@*@Html.EditorFor(model => model.TestId, new { htmlAttributes = new { @class = "form-control", @Type = "text", @list = "TestId" } })*@
@Html.LabelFor(model => model.Discount, "Discount(%)")

@Html.TextBoxFor(model => model.Discount, new { Class = "form-control", id = "txtdiscount" })
@Html.LabelFor(model => model.Discount, "(In Rupees)")
@Html.CheckBoxFor(model => model.DiscountIn, new { id = "discountrupees" })
@Html.LabelFor(model => model.Discount, "Test wise Discount")
2 Replies
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.
Madan ShekarPosted Jan 18, 2019, 4:06 AM
ejaz mirzaPosted Jan 18, 2019, 6:26 AM