I have a problem with my code:
- I would to redirect to an action with arguments from an cshtml file
but the url is not found file Admin cshtml:
@{ Layout = "~/Views/Shared/_General.cshtml"; } <table> <tr> <td><label title= "Name " runat="server">Name</label></td> <td><label title= "Email " runat="server">Email</label></td> <td><label title= "Password" runat="server">Password</label></td> <td><label title= "Phone" runat="server">Phone</label></td> </tr> @foreach (var marker in @Model) { <tr> <td><label title= "Nom " runat="server" >@marker.ContactName</label>/td> <td><label title= "mail " runat="server">@marker.ContactEmail</label>/td> <td><label title= "mot " runat="server" >@marker.Password</label>/td> <td><label title= "phone " runat="server" >@marker.ContactPhone</label></td> <td><label id="id" style="visibility:hidden">@marker.Identification</label></td> <td>@Html.ActionLink("Edit", "Edit", new { Identification = @marker.Identification }) | @Html.ActionLink("Delete", "Delete", "Administration")</td> </tr> } </table> <p> @Html.ActionLink("Create New", "Create") </p>
my action is this:
[HttpPost]
public ActionResult Edit(string Identification)
{
DATA2.User u = c.GetUserById(Identification);
return View(u);
}
How can I correct this code?