Nov 27, 2011 at 8:38 AM
Edited Nov 27, 2011 at 8:39 AM
|
OK... same thing happens with the "JsActionTest" project....
what I did:
downloaded the like, run in VS, I get the message box with the value displayed, as expected... this is all fine, and I have this working the same in my own test project...
to see what the issue i mentioned is:
in the HomeController.cs add a new view e.g. "About"
public ActionResult About()
{
return View();
}
Then Added the the view into the Views Folder ../Views/About.cshtml
then in the ../Views/Home.cshtml
add an @ActionLink("About" "About", "Home");
all stock-standard MVC3 stuff...
Now... run the project.... you will get the message box to display the JsAction Method value as before/expected...
now the issue I get is when i click the new link to goto the About View/Page
this is when the i get the json returned in the browser for the JsAction var..
e.g
var JsActions = {MyTestMethod:function(a,b,options){var opts = {url:"/Home/MyTestMethod",type: "GET",data:{a:a,b:b}};$.extend(opts,options); return $.ajax(opts);}}
So I assume is a Routing Issue of some kind
Thanks David
|