Notes:
<%@ Page language="C#" Inherits="BookStorePage" src="BookStore.aspx.cs" %>
<html>
<body>
<form Runat="server">
<asp:TextBox ID="isbn" Runat="server"/>
<asp:Button ID ="search" Text="Search" OnClick="Search" Runat="server"/>
<hr>
<table border="0">
<tr>
<td>Author:</td>
<td><asp:Label id="author" Runat="server"/>
</tr>
<tr>
<td>Title:</td>
<td><asp:Label id="title" Runat="server"/>
</tr>
<tr>
<td>Price:</td>
<td><asp:Label id="price" Runat="server"/>
</tr>
</table>
</form>
</body>
</html>
The program logic is implemented in a code-behind file, for example:
/csbook/solutions/19/BookStore.aspx.cs
using System; |
Because the code-behind accesses the web service BookStoreService from
exercise 2 we must generate a proxy class (using wsdl.exe as described there).
wsdl /out:BookStoreService.cs http://dotnet.jku.at/csbook/solutions/19/BookStoreService.asmx?WSDL
This class must be compiled into a DLL that we have to store in the subdirectory
bin of our virtual directory:
csc /target:library /out:bin\BookStoreService.dll BookStoreService.cs


