Ok so I've spent a couple hours trying to resolve this issue and have had no leads so far, keep getting the same 404 error. What happens is the website picks up the Default.aspx page and displays it like it should. But the Home page has a clickable image where it routes to another view page. The image code is like so:
<a href="<%= Url.Action("SelectPage", "Home") %>" onmouseover="lightup('pic1')" onmouseout="turnoff('pic1') ">
<img class="imageMain" src="<%= Url.Content("~/Content/Images/image.gif")%>" name="pic1" alt="Image 1" /></a>
When clicked I receive a 404 error.
My Controller View is setup like so:
public ActionResult SelectPage()
{
// Add action logic here
ViewData["Title"] = "Select an option";
ViewData["Header"] = "NoHeader";
return View();
}
in my global file i have the routing setup like so:
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Default", // Route name
"{controller}.aspx/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = "" } // Parameter defaults
);
I have tried the wildcard trick, but no luck I have also tried this tutorial http://www.asp.net/learn/mvc/tutorial-08-cs.aspx still no luck.
I have no idea where to go with this any help would be greatly appreciated.