Child actions are not allowed to perform redirect actions asp.net mvc error Ask Question
By   Junaid A     17-Dec-2024    1

Quesiton:

I am getting following error, while redirect in asp.net mvc

Child actions are not allowed to perform redirect actions asp.net mvc

Solutions


Nawab

Try to return 

return PartialView(...) 

instead on Return View()

Junaid A

Error is:

Server Error in '/' Application.


Child actions are not allowed to perform redirect actions.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.InvalidOperationException: Child actions are not allowed to perform redirect actions.

Source Error: 
 

Line 903:                        <div class="header-top"></div>
Line 904:                        @{
Line 905:                        Html.RenderAction("_header", "Home");
Line 906:                        }
Line 907:                    </div>

10121
Copyright Future Minutes © 2015- 2024 All Rights Reserved.   Terms of Service  |   Privacy Policy |  Contact US|  Pages|  Whats new?
Update on: Dec 20 2023 05:10 PM