In my routeConfig fle I have this procedure
Public Sub RegisterRoutes(ByVal routes As RouteCollection)
routes.IgnoreRoute("{resource}.axd/{*pathInfo}")
'This informs MVC Routing Engine to send any requests for .aspx page to the WebForms engine
routes.IgnoreRoute("{resource}.aspx/{*pathInfo}")
routes.IgnoreRoute("{resource}.aspx")
' Important change here removed 'controller = "Home"' from defaults. This is the key for loading
' root default page. With default setting removed '/' is NOT matched, so default.aspx will load instead
routes.MapRoute(
name:="Default",
url:="{controller}/{action}/{id}",
defaults:=New With {.controler = "Home", .action = "Index", .id = UrlParameter.Optional}
)
End Sub
In my `HomeControler` I have this function
Function Index() As ActionResult
Return View("Default")
End Function
Thus my `Default.aspx` is working just fine. But.
When I'm trying to `click` a button cannot Handle the `onclick` event (never goes to the sub.
So I use a `OnClientClick` in order to send the pointer there but it throws me the error of:
: grFlagsBtn_Click' is undefined
And one more issue I've noticed the program remains on `Home/Index` environment. And there is no any Index file there.
But the Url in my browser says `href="http://localhost:49224/Home/Index"`
I found that very much strange, because the program should be in `/Home/Default`
Please is some one to give me some help on this?
What I have tried:
Nothing more than the above actions