Click here to Skip to main content
15,893,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a domain suppose www.xyz.com,and there i host my mvc application,

i create a controller only for redirection from menulink,

suppose

Controller -> goto
action -> A1 {from here I called another action..with RedirectToAction(); function}

Suppose -> RedirectToAction("A2","C1");

when clicked the link ,this will genarate URL
Like->
www.xyz.com/xyz.com/C1/A2
I am new in MVC so that i cant fix this,please help me and
let me know how to set action and controller name in
RedirectToAction();.
Or some thing else i have to do.
Posted
Updated 19-Aug-13 2:55am
v3

Try like below
C#
return RedirectToAction("Index", "ControllerName");

Hope this helps
 
Share this answer
 
Comments
KuntalBose 19-Aug-13 8:59am    
i am doin the same thing but not working
Mukesh Ghosh 19-Aug-13 9:06am    
What kind of error you are getting?
Jameel VM 19-Aug-13 9:09am    
can you post the action ?
KuntalBose 19-Aug-13 9:11am    
legalinfoservices.com/ click on Law category menu and see the url
Jameel VM 19-Aug-13 9:17am    
i mean the actionresult structure.is there any parameter for that action?

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