Guest User

Untitled

a guest
Jun 22nd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. public class DDW2FileController : Controller
  2. {
  3. ...
  4.  
  5. public ActionResult Delete(string fileName)
  6. {
  7. return View(repository.GetFile(fileName));
  8. }
  9.  
  10. [AcceptVerbs(HttpVerbs.Post)]
  11. public ActionResult Delete(DDW2File ddw2file)
  12. {
  13. repository.Delete(file);
  14. return RedirectToAction("Index");
  15. }
  16. }
  17.  
  18. ...
  19.  
  20. public class DDW2File
  21. {
  22. public string Name { get; set; }
  23. public long Length { get; set; }
  24. }
  25.  
  26. <%=Html.TextBox("ddw2file.Name")%>
  27. <%=Html.TextBox("ddw2file.Length")%>
Add Comment
Please, Sign In to add comment