Trouble finding where a Controller Action is being called

I have worked on MVC3 before. But am having a hard time finding where a given controller action is being called.

We use Ajax and I wonnder if that may be the reason it's hard for me to find.

I search for "MyActionName(" but it doees not show up.

Any suggestions?

newbiewebSr. Software EngineerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Lets say we have a "HomeController", and inside this controller we have an "Index(int id)" method.

If I wanted to hit the Index method on the Home controller with AJAX, lets say using jQuery, I could have something like this:

        type: 'POST',
        url: '/Home/Index/' + id,
        success: function(data)
               // do something with data

or you could have just a link:

<a href="/Home/Index/123">Click Me</a>

or you could have mvc html helpers creating links for you such as:

@Html.Action("Index", "Home")
@Html.ActionLink("Click Me", "Index", "Home")

or you might have a View with a form on it like this:

@using (Html.BeginForm("Index", "Home", new { @id = 123 }))
      @* form elements here *@

and any <input type="submit"> elements on the above form that get clicked would hit that method

or you may check your global.asax file to see how the routing is working.  You may have a default route that is spilling into your method.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
newbiewebSr. Software EngineerAuthor Commented:
THANKS! Great Answer!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.