views:

19

answers:

0

hi,

I have a method with signature

public int create(string name, string loc)
    {


    }

in Default.aspx page codebehind,which will accept name,loc as parameters then creates a record in the DB with those values and returns the id of the newly created record.

I am trying to make a http post request to it using "Poster" with the following options.

URL: http://localhost:1293/website1/Default.aspx/create
Content Type:application/x-www-form-urlencoded

and in the Content To Send tab I have the following

name=yahoo&loc=www.yahoo.com

when I click on POST I am getting a HTTP 200 status along with the markup of Default.aspx page but not the id of the record and when I checked the DB I could not find the new record created either.

When I test the method by passing same values from aspx page instead of "Poster" I can see the record creating and also able to get its id.

Could someone please correct me if I am doing anything wrong in the process of making HTTP post request from "Poster"?

Thanks