Hello,
I am trying to update my table Supplier when user fill textboxes and when click on button.
Is it possible to update table Suppler with jquery and ajax?
My database consist of four tables: Supplier, Town, Street and Adress.
Columns of table Town: TownID(primary key), NameTown
Columns of table Street: TownID,StreetID (composite primary key),NameStreet
Columns of table Adress: TownID,StreetID,NumberAdress(a
Columns of table Supplier: SupplierID,NameSupplier,TownID
This is my View: for ChangeSupplier
@model FpisNada.Models.Dobavljac
@{
ViewBag.Title = "Index";
Layout = null;
}
@Html.TextBoxFor(model => model.SupplierID, new { @placeholder = "pib dobavljaca", style = " float:left" })
<div class="col-md-9">
@if (ViewBag.ListaMesta != null)
{
@Html.DropDownListFor(m => m.TownID, ViewBag.ListaMesta as SelectList, "--select mesto--", new { @class = "form-control", style = " float:left" })
}
@Html.DropDownListFor(m => m.StreetID, new SelectList(""), "--select ulicu--", new { @class = "form-control", style = " float:left" })
<div class="container">
@Html.TextBoxFor(model => model.NumberAdress, new { @class = "form-control"})
@Html.TextBoxFor(model => model.Email, new { @class = "form-control" })
@Html.TextBoxFor(model => model.NameSupplier, new { @class = "form-control" })
@Html.TextBoxFor(model => model.NumberOfPhone, new { @class = "form-control" })
</div>
</div>
<input type="button" value="Edit" id="update"/>
I appreciate any advice and help!