Step by Step to create a Web Service, stepservice
Address: http://www.cnblogs.com/jfzhu/p/4022139.html
Reprinted please indicate the source
(1) create a Web Service
Create the first project and select ASP. NET Empty Web Application as the type.
[Serializable] public class Contact {private string name; public string Name {get {return name;} set {name = value ;}} private int age; public int Age {get {return age;} set {age = value ;}}}
HelloWebService. asmx. cs:
/// <summary> /// Summary description for HelloWebService /// </summary> [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [System.ComponentModel.ToolboxItem(false)] // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. // [System.Web.Script.Services.ScriptService] public class HelloWebService : System.Web.Services.WebService { [WebMethod] public string GetMessage(string name) { return "Hello " + name; } [WebMethod] public Guid CreateContact(Contact c) { return Guid.NewGuid(); } }
(2) create a client
Create a client to call the Web Service and check whether it is correct. Create an ASP. NET Empty Web Application
Protected void button#click (object sender, EventArgs e) {HelloWebService. helloWebServiceSoapClient client = new HelloWebService. helloWebServiceSoapClient (); Label1.Text = client. getMessage (TextBox1.Text);} protected void Button2_Click (object sender, EventArgs e) {HelloWebService. helloWebServiceSoapClient client = new HelloWebService. helloWebServiceSoapClient (); Label2.Text = client. createContact (new HelloWebService. contact ()). toString ();}
Finally, run the client and click the button to get the demo effect.
How many full sets of step by step books? What are them?
An excellent set of English Listening teaching materials is published by East China Normal University in the old version. There are 4 books in total, which are used as the introductory books for English Listening in colleges and universities. There are two editions. (Step by step 2000, step by step 3000)
Who sang a song step by step?
Yesstep by step
It's not a new guy.
But it's a Japanese single.