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

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -