[Play.aspx]
[asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
.....
viewvideo(videoid)
.......
[/asp>
[Video.js]
function viewvideo(videoid)
{
varVideoid = videoid;
$("#video").empty();
var data = Ajax("../Ajax/Webmethod.aspx/getviewvideo", { videoid: videoid });
}
[function.js]
function Ajax(url, _data) {
var obj;
$.ajax({
type: "post",
url: url,
data: JSON.stringify(_data),
async: false,
contentType: "application/json; charset=utf-8",
datatype: "json",
success: function (data) {
obj = $.parseJSON(data.d);
},
error: function (xhr, status, error) {
alert("Some Error");
}
});
return obj;
}
[Webmethod.aspx.cs]
[WebMethod]
public static string getviewvideo(string videoid)
{
databasesss db = new databasesss();
JavaScriptSerializer js = new JavaScriptSerializer();
.........................
}
return js.Serialize(v);
}
Hi, I have speed issue when ajax calls webmethod, How can I improve the perfomance Any comment would be helpful Thank you
ps)I have tried to use but there are many things to edit so I am looking for another way