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?
5 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Krishna KumarPosted Dec 28, 2016, 12:08 AM
Salman BegPosted Dec 26, 2016, 6:42 AM
Manas MohapatraPosted Dec 26, 2016, 6:30 AM
Krishna KumarPosted Dec 26, 2016, 6:24 AM
Manas MohapatraPosted Dec 26, 2016, 6:17 AM