Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
4
Answers
How to call a server side method with custom parameters.
Praveen Raveendran
10y
785
1
Reply
How to call a server side method with custom parameters as inputs via jquery ajax functionality?
public class Employee
{
public int ID { get; set; }
public string Name { get; set; }
}
[WebMethod]
public static void AddEmployee(Employee employee)
{
//Some logic
}
In my design I have two textboxes for inputting ID and Name of the employee. On clicking the button I need to invoke the method
AddEmployee
.
How can I pass the values to the WebMethod
AddEmployee
via jquery ajax?
Please mention a solution for these kind of scenarios.
Post
Reset
Cancel
Answers (
4
)
Next Recommended Forum
jquery
Javascript Function comparing issue