Join the Stack Overflow Community
Stack Overflow is a community of 6.5 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up

this is simple but it dosent work

in angularJS part i have this code :

   var data={"ID":1,"Key":"********"}
            $http.post("/Home/DeleteListItem", data)
                .success(function (data) {
                    alert(JSON.parse(data));
                }).error(function (response) {
                    alert(response);
                });

and C# Part is like this

 [HttpPost]
public JsonResult DeleteListItem(Entity entity)

{

kishAppEntities db = new kishAppEntities();
Stream req = Request.InputStream;
db.Configuration.ProxyCreationEnabled = false;
var data = //some delete query

return new JsonResult()
{
    Data = data,
    JsonRequestBehavior = JsonRequestBehavior.AllowGet

};

}


public  class Entity
{
    int ID { set; get; }
    string Key { set; get; }

}

there is no data in entity i dont have clue aboute it???? enter image description here

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.