Hi I have problem with ActionResult Method overloading in MVC2
I have 3 methods
public ActionResult MyMethod()
{
var data = ........
//some unfiltered data from db
return view(data);
}
public ActionResult MyMethod(string name)
{
var data = .......
Where xxx.StartsWith(name)
//some filtered data by name
return View(data);
}
public ActionResult MyMethod(int age)
{
var data = .......
Where xxx.Equals(age)
//some filtered data by age
return View(data);
}
How can i overload methods in Asp.Net MVC2? Thanks.