Code Snippet:
Web reference or Service reference.
In service reference we use the CalculatorSoapClient (Click on the service reference to view the interface & SOAP implementation classes) class to create the object.
In Web reference (add service reference --> advanced --> Then you get the web reference option) we use the Calculator i.e the asmx service name to create the object.
webserferenceCal.Calculator ww = new webserferenceCal.Calculator();
Label1.Text = Convert.ToString(ww.add(10,10));
ServiceReferenceCal.CalculatorSoapClient bb = new ServiceReferenceCal.CalculatorSoapClient();
Label2.Text = Convert.ToString(bb.add(11, 12));
Label1.Text = Convert.ToString(ww.add(10,10));
ServiceReferenceCal.CalculatorSoapClient bb = new ServiceReferenceCal.CalculatorSoapClient();
Label2.Text = Convert.ToString(bb.add(11, 12));