Testing the Page


You ve now got a slideshow page with all the controls you need and the code that will display a picture. Before we continue with more coding, you ll want to test the page to see if what you ve done up to now is working.

Press F5 to run the page. After the Web server starts up, the browser should open and you should see your page with the first image on it. If so, great go on to the next section. If not, let s troubleshoot. If you used my example code, make sure you ve copied the code as shown in the previous section. Some potential issues that might come up include the following:

  • If you get the error message The specified port number is already in use. Please specify a different port number, you ll know that the Web Matrix server is already running. In the notification area of the Windows taskbar, right-click the Web Matrix server icon and choose Stop, and then try running the page again.

  • Make sure the value of the path variable has a trailing forward slash (/) in it.

  • Double-check that the path variable points to the right folder.

  • Double-check the file names of your pictures, especially the extensions.

  • Don t forget to include the End Sub statement at the end of the Page_Load handler.

  • Don t forget that the counting of array elements begins at 0.

If you see an error message, which is a white page with a yellow box and some red text, study it and see whether you can deduce what the problem is. At this stage, any errors you see are probably the result of typos.




Microsoft ASP. NET Web Matrix Starter Kit
Microsoft ASP.NET Web Matrix Starter Kit (Bpg-Other)
ISBN: 0735618569
EAN: 2147483647
Year: 2003
Pages: 169
Authors: Mike Pope

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net