Using MVC Razor I have a very simple test. "Registrar" writes messages to the log file
Testcontroller.cs
public ActionResult Index()
{
logger.Trace("Test Index Called");
return View();
}
Index.cshtml
<html>
<head><title>Testing</title></head>
<body><h3>This is a test</h3></body>
</html>
Global.asax.cs
routes.MapRoute(
"Default",
"{controller}/{action}",
new { action = "Index" }
);
When I run the code, the log file shows this:
2011-12-15 10: 16: 09.4475: named test index
2011-12-15 10: 16: 09.4475: named test index
Please note that the timestamp for both calls is at the same time? I fixed the problem when people said that empty src attributes on the image tag and / or javascript functions are not returned.
I made it as simple as possible, but the index action is called twice in a row.
reference
source
share