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
Post a Comment