TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Austin Muts
1.1k
329
125.5k
How to call a c# method using angularJS
Oct 6 2017 5:02 AM
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!
Reply
Answers (
1
)
what is the meaning of [required]?
Tab Control Pages