@{ var imagePath="/calendar/"; var calendarid = Request["CalendarId"]; var fileid = imagePath + calendarid +".pdf"; var files = Directory.GetFiles(Server.MapPath("~/calendar/")).Select(f => new {FileName = Path.GetFileName(f)}).OrderByDescending(f=>f.FileName); var grid = new WebGrid(files, rowsPerPage:22); grid.SortDirection = SortDirection.Descending; } Calendar Files
@{ if (IsPost) {

You entered:
ACRGA Calendar ID: @calendarid
The File is : @calendarid


// Invalid ID // Invalid ID // } else {
ACRGA Calendar ID:

This ACRGA reference number is on your postcard. Enter the number without an extension or click one of the files listed below.

@grid.GetHtml( columns: grid.Columns( grid.Column("FileName", "Message ID", format: @@item.FileName) ) )
} }