0
<div class="form-group">
<div class="row">
<div class="col-md-2 col-sm-2" style="margin-left:20px">
<b>State</b>
</div>
<div class="col-md-8 col-sm-8">
<select class="form-control" data-modal="modal" ng-options="I.CountryID as I.CountryName for I in CountryList" ng-model="CountryID" ng-change="StateList()" ng-required="true">
<option value="" disabled selected>--Select Country--</option>
</div>
</div>
</div>
角度コード
$scope.AddUpdateEmployee = function (Emp) {
alert("Enter in update")
var Employee = {
Id: $scope.EmployeeId,
Name: $scope.EmployeeName,
Email: $scope.EmployeeEmail,
Psw: $scope.Password,
Country: $scope.CountryID,
};
MVCコード
public JsonResult AddEmployee(Employee emps)
{
if (emps != null)
{
Employee ee = new Employee();
ee.Name = emps.Name;
ee.Email = emps.Email;
ee.Psw = emps.Psw;
ee.Country = emps.Country;
ee.State = emps.State;
ee.City = emps.City;
}
あなたがにデータを投稿しようとするのですかデータベース?私は全体のコードを見ることができます、今すぐあなたは作品を共有している、私はあなたがどこにバインドされているhtmlを参照する必要がありますか? –