<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="/statics/demosource/showrazor.css" />
</head>
<body>
<p><span class="marked">@{
var dataFile = Server.MapPath("~/App_Data/Persons.txt");
Array userData = File.ReadAllLines(dataFile);
}
</span><!DOCTYPE html>
<html>
<body>
<h1>Reading Data from a File</h1>
<span class="marked">@foreach (string dataLine in userData)
{
foreach
(string dataItem in dataLine.Split(','))
{
@dataItem <text>&nbsp;</text>}</span>
<span class="marked">}</span>
</body>
</html></p>
</body>