Click here to Skip to main content
15,898,134 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I use
return RedirectToAction("Index", "Home", new { Area="???" });


in a inner area.

I don't know how redirect to main segment
Posted

return RedirectToAction("Index","Home"); will redirect you to the main page. The additional and the third parameter is to pass any objects (optional)
 
Share this answer
 
Comments
kave2011 3-Sep-13 9:54am    
that redirect me in same area
Bala Selvanayagam 3-Sep-13 10:00am    
Which controller and the action method you are in now and which are (controller and action method) you want to invoke ?
kave2011 3-Sep-13 13:02pm    
I am in Area:xx/controller:yy/action:zz
and I want to go root
then to Home/index
kave2011 3-Sep-13 10:12am    
I am in Area:xx/controller:yy/action:zz
and I want to go root
then to Home/index
I found it
C#
return RedirectToAction("Index", "Home", new {Area="" });
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900