javascript - URL string parameters passed to MVC controller action arrive as null -
have controller:
public class mycontroller : controller { [httpget] public actionresult myaction(int imode, string strsearch) { return view(); } }
in view have div id=center
i execute following code in javascript
url = "/mycontroller/myaction?imode=7&strsearch=as"; $('#center').load(url);
when debugger breakpoint in action on first line, imode variable shows proper value of 7, strsearch parameter arrives null.
any help/advice welcome.
just use ampersand instead of &
url = "/mycontroller/myaction?imode=7&strsearch=as";
Comments
Post a Comment