पोस्ट करने के लिए मानकों के साथ RedirectToAction यह सवाल यहाँ कहा गया है:ASP.NET MVC: कार्रवाई
RedirectToAction with parameter
लेकिन क्या होगा अगर मैं एक ही नाम है, लेकिन विभिन्न मापदंडों के साथ दो कार्यों है? मैं Terms
कार्रवाई के बजाय POST Terms
कार्रवाई पर रीडायरेक्ट कैसे करूं?
public ActionResult Terms() {
//get method
}
[HttpPost]
public ActionResult Terms(string month, string year, int deposit = 0, int total = 0) {
//process POST request
}
क्या आप RedirectToAction को देख रहे हैं? – PSL
http://stackoverflow.com/questions/2626179/routing-to-the-actions-with-same-names-but- अलग-parameters –
आप किसी पोस्ट एक्शन पर रीडायरेक्ट नहीं कर सकते हैं। एक रीडायरेक्ट हमेशा मिलता है, इसलिए यह संभव नहीं है। –