Creating the Quotations Text File


Before you create the sample Web page in Web Matrix, you need a plain ASCII text file containing the quotations you want to include. You can create this text file using a text editor such as Notepad, or you can use an application such as Microsoft Word, but be sure to save the document as text.

Create the quotations text file

  1. Use Notepad or another text editor to create a file named  quotations.txt .

  2. Save the file in the directory in which you store the Web pages you create with Web Matrix. Make sure that you enter your quotations into the text editor in the following manner:

    • Enter each quotation all on one line. If necessary, turn off word wrapping in your text editor. It s important that the quotations do not contain any line breaks because in the code we write later, we ll expect the quotations to be on a single line. The quotations need to be on a single line, but they can be as long as you like.

    • After the quotation, but still on the same line, enter a pipe character (|).

    • Add the author s name on the same line.

    Here is an example of how to enter a quotation into the text file:

    What is past is prologue.|Shakespeare

The pipe character is a delimiter that is, a character that separates one part of the string from another. You can use any character as a delimiter; I use the pipe character (|) because it s unlikely to be part of an actual quotation. You can include as many quotations (lines) in the file as you want the more, the better.

Important 

Don t leave any blank lines at the bottom of the quotations file. If you do, you ll get blank quotations.




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