1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
| <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<MvcApplication2.Personne>>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
Index
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%--<% using (Html.BeginForm()) {%>--%>
<h2>
Index</h2>
<script language="javascript">
function Edit() {
document.getElementById("Name").innerHTML ="";
var c, c2, ch1, ch2;
c = document.getElementById("Name");
c2 = c.getElementsByTagName("input");
ch1 = document.createElement('input');
ch1.setAttribute("type", "text");
ch1.setAttribute("value", "tintintintint");
c.appendChild(ch1);
}
</script>
<table>
<tr>
<th>Id_dossier</th>
<th>Utilisateur</th>
<th>Mot de passe</th>
</tr>
<% foreach (var item in Model)
{ %>
<% using (Html.BeginForm())
{%>
<%: Html.ValidationSummary(true) %>
<tr>
<td>
<%: item.id_Personne%>
</td>
<td id="Name">
<%: item.Nom%>
</td>
<td>
<%: item.Prénom%>
</td>
<td>
<input type="button" name="Editer" value="Editer" onclick="Edit();" />
</td>
<td>
<input type="submit" value="Personne" />
</td>
</tr>
<% }
} %>
</table>
<%-- <% } %>--%>
</asp:Content> |
Partager