Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
How to call a c# method using angularJS
Austin Mudadi
Oct 6 2017 5:02 AM
175
Reply
I have a server side method like which use C#
[ HttpPost]
public void PostgresSQLtest(JObject data)
{
string firstname = data.Value<string>("name");
string surname = data.Value<string>("surname");
string email = data.Value<string>("email");
int telephone = data.Value<int>("phone");
}
I want to pass parameters to PostgresSQLtest(JObject data) from the client side which uses angularjs and here is the method
app.controller('pages/regtest.html', function ($scope, $cordovaCamera, $window, server) {
$scope.register = function () {
if (!$scope.name) {
alert("Enter name");
return;
}
server.request('PostgresSQLtest', {
name: $scope.name,
surname: $scope.surname,
email: $scope.email,
phone: $scope.telephone,
});
};
});
BUT i seem unable to pass parameters from client side to server side method.Server.request seem not to connect to PostgresSQLtest() method in the server side.Can someone HELP!
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
what is the meaning of [required]?
Tab Control Pages