Hi ,
i have the below controller
[HttpPost, Route("EmployeeProfile")]
public HttpResponseMessage Create(HR_EmployeeProfile EmployeeProfile)
{
return Request.CreateResponse(HttpStatusCode.OK, _EmployeeProfileManager.Create(EmployeeProfile));
}
and i have the below aspx page
protected void BtnSaveEmpDet_Click(object sender, EventArgs e)
{
var emp = new EmployeeProfile();
emp.MiddleName = txtMiddleName.Text;
emp.LastName = txtLastname.Text;
emp.Add_Street1 = txtAddStreet1.Text;
emp.Add_Street2 = txtAddStreet2.Text;
emp.Add_City = txtAddCity.Text;
emp.Add_State = txtAddState.Text;
emp.Email = txtEmail.Text;
}
where EmployeeProfile is a model and i am assigning the input values from textboxes and assigning them to the field values in the model. Now, i want to send the emp object to the controller for creating the profile.
how could i do that?

Manas MohapatraRank #182 · 13.2K reputationPosted Dec 26, 2016, 1:17 AM EST
Krishna Kumar116 reputationPosted Dec 26, 2016, 1:24 AM EST
Manas MohapatraRank #182 · 13.2K reputationPosted Dec 26, 2016, 1:30 AM EST
Salman BegRank #284 · 8.8K reputationPosted Dec 26, 2016, 1:42 AM EST
Krishna Kumar116 reputationPosted Dec 27, 2016, 7:08 PM EST