Rohan

Rohan

  • NA
  • 1.4k
  • 118k

How to send Note in web api

Aug 5 2021 9:33 AM

This is my c# method 

public async Task<ItemResponse<ActivityModel>> InsertActivityWithNote(ActivityModel model, string note)

I have send data in model but (note without model so how to send note field by ajax call)

note = $(".newnote-textarea").val().trim();
            var data = new FormData();
            data.CreatedOn = strDate;
            data.CreatedBy = userids;
            data.UserID = userids;
            data.ModifiedOn = strDate;
            data.ModifiedBy = userids;
            data.isActive = true;
            data.ActivityID = 3;
            data.PublisherID = 5000;
            data.OrganizationContactID = publisherData.organization.organizationId;
            $.ajax({
                type: "POST",
                url: apiurl,
                dataType: "json",
                contentType: "application/json",
                data: JSON.stringify(data, note = note),


Answers (3)