I'm trying to build a c# web page that accepts xml code generated by another computer. So I want to accept a string and then send it into my code. I have looked here: Getting a POST variable but that question lacks the explanation of how to invoke your code opon receiving a request. Reading: http://ift.tt/1KgiYII as suggested in How to send and receive the POST request in asp.net? didn't help either.
something like what I want is:
public partial class WebForm1 : System.Web.UI.Page{
BaseSocket bs = new BaseSocket();
public void OnReceivedPost(object sender , string value)
{
bs.ConnectToCode(value);
}
}
So that if the other send a web request to www.example.com then it goes into my code (connectToCode).
Aucun commentaire:
Enregistrer un commentaire