i can`t get param in my POST method

morpheus2008

New Member
I have POST method like this\[code\] public void PostMethod([FromBody]string param) { var test = param; }\[/code\]And simple JS script\[code\]<script type="text/javascript">$.ajax({ url: 'http://localhost:8101/sd/Localization/PostMethod', type: 'POST', data: { param: 'test' }});</script>\[/code\]Ot work great. Ajax call is invoking the method BUT the param is null :/ always. I don`t know why. I can't get it running. Can someone pls help me and show me the correct direction ?
 
Back
Top