Introducing ASP.NET Web Matrix
Pages: 1, 2, 3, 4, 5
Our aim is to add an additional column to our DataGrid so that we
can select a particular title and view its author and book cover
image. Also, add in a Textbox and Button control so that users
can search for titles. The familiar ToolBox (adding controls) is
available in ASP.NET Web Matrix.
Our page now looks like Figure 7.
|
|
Once the design of the page is done, you can now proceed to coding the application logic. At the bottom of the ASP.NET Web Matrix, you will find four tabs:
- Design: presents the layout of a page graphically.
- HTML: shows the HTML codes for the page.
- Code: shows only the codes for a page.
- All: shows the entire page containing the HTML codes and the application codes.
|
|
Since ASP.NET Web Matrix does not support code-behind, the four tabs present a useful view to the different aspects of a Web page. You can either double-click on a page in design view or click on the Code tab to display the codes.
Coding the Application Logic
Since you are consuming Amazon's Web service, you need to build a proxy class to access it. The ASP.NET Web Matrix provides a Web service proxy class generator (Tools- >WebService Proxy Generator):
|
|
What we have done is actually copy the WSDL document provided by
Amazon and save it into the local drive (accessed using the
file:// protocol).
You can also access the WSDL document at: http://soap.amazon.com/schemas/AmazonWebServices.wsdl. (If you are behind a proxy server, be sure to configure the proxy server in your IE settings; do not use automatic configuration settings.)
Also note that the proxy class must be generated and saved in the same directory as your ASP.NET page.




