Advertisement
Guest User

Untitled

a guest
Apr 25th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.56 KB | None | 0 0
  1. public ActionResult FormRequest(PersonData personData)        
  2. {              
  3.     if (HttpContext.Request.HttpMethod == "GET")            
  4.     {                
  5.         return View("Questionery");//если get, перересовываю страницу            
  6.     }            
  7.     if (HttpContext.Request.HttpMethod == "POST")            
  8.     {                
  9.         return View("FormRequest",personData);/*если post вывожу дынные */            
  10.     }            
  11.     else            
  12.     {                
  13.         return HttpNotFound();            
  14.     }        
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement