Examining Visual Studio .NET 
by Martin Heller

Example 1:
(a)
[WebMethod]
public string HelloWorld()
{
  return "Hello, World from DDJ";
}

(b)
<form id="Form1" method="post" runat="server">
<H1>DDJ Web Service Consumer</H1>
<P>
<asp:Label id=Label1 runat="server">not yet set</asp:Label></P>
<P>
<asp:Button id=Button1 runat="server" Text="Test me!"></asp:Button></P>
</form>

(c)
private void Button1_Click(object sender, System.EventArgs e)
{
  DDJWebService.Service1 ddjws = new DDJWebService.Service1();
  Label1.Text = ddjws.HelloWorld();
}

1


