asp.net mvc - Redirect to a view -


i new mvc. need redirection view. have views folder within rentals folder inside rentals folder displayinvoicelist.cshtml want display. how can achieve this?

              --rentals                 --displayinvoicelist.cshtml      [httppost]             public actionresult index(rentalcustomerviewmodel amerentalvm)             {                                try                     {                         conn.open();                         amecmd.executenonquery();                         strresult = amecmd.parameters["returnvalue"].value.tostring();                          if (strresult == "1")                         {                             if (conn.state == connectionstate.open)                             {                                 conn.close();                             }                              //redirect page                             redirecttoaction("displayinvoicelist", "rental");                            }                      }                     catch (exception ex)                     {                         response.write(ex.message);                     }                 }                  return view();             }                  [httpget]             public actionresult displayinvoicelist()             {                  return view();             } 

[httpget] public actionresult displayinvoicelist() {      return view("rentals/displayinvoicelist"); } 

Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -