Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 06, 2012 06:41 PM by sequeiradenzil
Member
7 Points
6 Posts
Feb 29, 2012 03:41 PM|LINK
hello everyone i m new to jquery so i do not know how to deserialize in jquery.i m sending serialized data from aspx.cs page.
Deserialization jquery mvc
Contributor
2600 Points
484 Posts
Feb 29, 2012 04:26 PM|LINK
Please go through the below thread.
http://stackoverflow.com/questions/759385/asp-netjquery-how-to-deserialize-json
Mar 01, 2012 06:09 AM|LINK
can anybody tell me whats the error in it
<script type="text/javascript"> $(document).ready(function () { $('#txtSearch').keyup(function () { var firstdata = $("#txtSearch").val(); $.ajax({ url: "Autocompletewithdata.aspx", type: "POST", data: firstdata, dataType: "json", success: function (data) { var result = new Array(); //result = eval('(' + $data + ')'); alert(data); alert(result[0]); alert(result[1]); }, error: function (err) { alert(err); } }) }) $("#txtSearch").autocomplete({ source: result }); }); </script>
24 Points
11 Posts
Nov 06, 2012 06:41 PM|LINK
You have to Serialize the data into Json to send it to jquery from a aspx.cs page ... You can make use of Json.net for serialization.... And to read the data in jquery do use $.ajax({});
here are the links to the examples of the above reply
htp://www.api.jquery.com/jQuery.ajax/
http://james.newtonking.com/projects/json-net.aspx
RahulSharma4...
Member
7 Points
6 Posts
How to deserialize in jquery?
Feb 29, 2012 03:41 PM|LINK
hello everyone i m new to jquery so i do not know how to deserialize in jquery.i m sending serialized data from aspx.cs page.
Deserialization jquery mvc
Shellymn
Contributor
2600 Points
484 Posts
Re: How to deserialize in jquery?
Feb 29, 2012 04:26 PM|LINK
Please go through the below thread.
http://stackoverflow.com/questions/759385/asp-netjquery-how-to-deserialize-json
RahulSharma4...
Member
7 Points
6 Posts
Re: How to deserialize in jquery?
Mar 01, 2012 06:09 AM|LINK
can anybody tell me whats the error in it
<script type="text/javascript">
$(document).ready(function () {
$('#txtSearch').keyup(function () {
var firstdata = $("#txtSearch").val();
$.ajax({
url: "Autocompletewithdata.aspx",
type: "POST",
data: firstdata,
dataType: "json",
success: function (data) {
var result = new Array();
//result = eval('(' + $data + ')');
alert(data);
alert(result[0]);
alert(result[1]);
},
error: function (err) {
alert(err);
}
})
})
$("#txtSearch").autocomplete({
source: result
});
});
</script>
sequeiradenz...
Member
24 Points
11 Posts
Re: How to deserialize in jquery?
Nov 06, 2012 06:41 PM|LINK
You have to Serialize the data into Json to send it to jquery from a aspx.cs page ... You can make use of Json.net for serialization.... And to read the data in jquery do use $.ajax({});
here are the links to the examples of the above reply
htp://www.api.jquery.com/jQuery.ajax/
http://james.newtonking.com/projects/json-net.aspx