Hello everyone :I am working on a .net mvc3 application. Here is my controller and action :
public class Foo_Bar : Controller
{
public ViewResult Foo_Bar()
{
return View();
}
}
And my corespondent view file is : Foo_Bar.cshtml
now ,my question is : I have a url as: www.mystite.com/foo-bar/foo-bar but this url can not invoke the Foo_Bar/Foo_Bar controller and action except I write it as thes: www.mystite.com/foo_bar/foo_bar .
Now I need to replace the "-" with "_" before the route system mapping my controller and action. Can I do it in the routes.MapRoute()? Some one please help me .Thank you advance !ps:this is my first time to ask an question in Stack overflow:)