aspdotnet-suresh offers articles and tutorials,csharp dot net, articles and tutorials,VB.NET Articles,Gridview articles,code examples of 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

How to send or pass multiple parameters in jquery ajax in

Jul 17, 2012

Here I will explain how to send or pass multiple parameters using JQuery or JSON in


In previous posts I explained articles relating JSON in that I explained how to call page methods using JSON or JQuery in or Auto complete textbox with JQuery/JSON in Now I will explain how to pass or send multiple parameters using JQuery or JSON in

If we want to send or pass multiple parameters using JSON or JQuery in we need to declare it like as shown below

type: "POST",
contentType: "application/json;charset=utf-8",
url: "SaveAudiVideo.aspx/SaveData",
data: JSON.stringify({title: 'value1' ,songPath: 'value2' }),
dataType: "json",
success: function(data) {
error: function(result) {
Here JSON.stringify is used to encode the parameters in JSON format and our webmethod will be like as shown below

C# Code

public static string SaveData(string title,string songPath)
string str = string.Empty;
return str;

<WebMethod()> _
Public Shared Function SaveData(ByVal title As String, ByVal songPath As String) As String
Dim str As String = String.Empty
Return str
End Function

If you enjoyed this post, please support the blog below. It's FREE!

Get the latest,, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email


Unknown said...

hi suresh i have tried the same but it is not working for there anyother thing i want to include in my project like ajax or JSON(newtonsoft json) ? my mail id is:
i am trying this with jquery ajax for a long time. i understood the concepts but its not working for me .
thanks and regards
karthikeyan s (

Unknown said...

How to pass values to String[] patameter

Give your Valuable Comments

Note: Only a member of this blog may post a comment.

© 2015 All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.