I have a model with the following definition:
namespace ESimSolChemical.Models
{
public class Employee
{
public int EmployeeID{ get; set; }
public string EmployeeName{ get; set; }
public string Age{ get; set; }
public string Address{ get; set; }
}
I have Following JavaScript:
<script type="text/javascript">
$(function () {
$('#btnEmployeePiker').click(function () {
var oParameter = new Object();
oParameter.MultipleReturn = false;
var oReturnObject = window.showModalDialog('/Employee/EmployeePiker/', oParameter, 'dialogHeight:470px;dialogWidth:550px;dialogLeft:400;dialogTop:100;center:yes;resizable:no;status:no;scroll:no');
});
});
</script>
My Javascript oReturnObject
contains two property Like :
oReturnObject.EmployeeID;
oReturnObject.EmployeeName;
Now I would like to assign:
@Model.employeeID= oReturnObject.EmployeeID;
How can I accomplish this task?