I'm having a problem trying to call a javascript function in a JS file to a controller. I wanted to use the function in the JS file then return the value to a controller who calls that function.
Here is my code: (JS File)
function getQueryString(url) {
var arrSplit = url.split('?');
return arrSplit.length > 1 ? url.substring(url.indexOf('?')+1) : '';
}
And I wanted to make a call like this in my controller. (Controller)
private string DoSomething(){
getQueryString("http://sample.com");
}
Is is this possible? Or if ever do you have any suggestions or any possible workarounds?