views:

23

answers:

2

When I have the following action in a form tag, what does the '/Account/Profile` part mean?

<form method="post" action="/Account/Profile"

Is it a Filename for a view? Is it an action?

+1  A: 

This will depend on the routing you have setup but if you stick to the conventions Account is a controller (a file called AccountController.cs) and Profile is an action method of this controller:

// Account is a controller
public class AccountController : Controller
{
    // Profile is an action method
    public ActionResult Profile()
    {
        return View();
    }
}

I would recommend you following some of the tutorials here to get yourself familiarized with the basics of ASP.NET MVC.

Darin Dimitrov
A: 

If you're using the default route Account is the controller and Profile is the action. The controller is the class and action is the method that will be called. You can check out your routes in Global.asax file

Branislav Abadjimarinov