Calling server side Methods(Webservices) from client side using Jquery, ASP.NET

preview_player
Показать описание
We all find it very difficult too perform a database update/insert very hard to do from a .aspx page or the html/client page. Here we are able to perform that using a simple webservice and JQUERY call function.

#jquery #webservice #clientserverinteraction
Рекомендации по теме
Комментарии
Автор

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm5.aspx.cs" %>

<!DOCTYPE html>

<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1"
<asp:TextBox ID="TextBox2"
<input id="Submit1" type="submit" value="submit" onclick="ShowCurrentTime()" />
</div>
</form>

<script type="text/javascript">
function ShowCurrentTime() {
{
var s =
var Pre =
$.ajax({
type: "POST",
url: "WebService5.asmx/HelloWorld",
data: "{slno:"+s+", Price:"+Pre+" }",
contentType: "application/json",
datatype: "json",
success: function(responseFromServer) {
alert(responseFromServer.d)
}
});
}
//);
</script>
</body>
</html>

fired_developer
Автор

You are rocking....thank you, keep up the good work.

GFactFinder
Автор

sir plz share the code ASP NET MVC 5 Real time project source code free download | Online Restaurants and food online

ytmarley