<table id="myTable" width="50%"> <tr> <% Html.BeginForm("Add","Holidays", FormMethod.Post); %> <td><input id="Date" type="text" name="date" style="width:250px"/></td> <td><input id="Description" type="text" name="Description" style="width:250px"/></td> <td><input type="submit" name="submitButton" value="Add" class="highlight"/></td> <% Html.EndForm(); %> </tr> <tr> <th>Date</th> <th>Description</th> <th>Edit</th> </tr> <%foreach (Holiday kvp in (IList<Holiday>)ViewData["Holidays"]) {%> <tr> <td><%= kvp.Date.ToString("dd/MM/yyyy") %></td> <td><%= kvp.Description %></td> <td><%: Html.ActionLink("Edit", "Edit", "Holidays", new { year = kvp.ID.ToString("yyyy"), holidayid = kvp.ID, name = kvp.Description, date = kvp.Date }, new { @style = "color:Blue;font-size: 11px;text-decoration:none;" })%></td> </tr> <%} %> </table>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)