i am new to MVC and i am stuck at one point into project i wanted to check the Availability of a Batch,i am using a Dropdownlist and it is populate by Batch table.
My Question is when i am selecting a batch from drop downlist on same time it will give Msg that Batch is available or Not.
Batch Table Structure is: BatchID BachName TotalSeat AvailableSeat 01 L1 50 40 02 L2 20 20
i don't know how to do this task.
You can see the different solutions form this link:
@using (Html.BeginForm("Method", "YourController")) {
@Html.DropDownList("Id", ViewBag.DropDownCollection as SelectList, "--pick--", new {
title = "Pick Batch",
onchange = "submit();"
});
}
ActionResult
public ActionResult Method(string Id)
{
//do the logic here
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With