I have a partial view that is been used in several places in the product. Within this view, I am doing a JSON call via Url.Action(“MyActionMethod ”,10) that calls this method MyActionMethod from Home controller. My problem is when I use this partial view from a different place (let’s say MyView1 in context of AccountController ), its trying to search for Account/MyActionMethod whereas this method is available at Home/MyActionMethod . If I change code to Url.Action("/Home/MyActionMethod" ,10), it basically looks for Account/Home/MyActionMethod .
Any ideas?
or if you are using areas and you want to specify the root: