%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<script type="text/javascript" src="Scripts/jquery-1.4.1.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
debugger;
var counter = "test";
WebApplication1.Service1.DoWork(counter, ResultLoadMainGridProductType, ErrorLoadMainGridProductType);
});
function ResultLoadMainGridProductType() {
}
function ErrorLoadMainGridProductType() {
}
</script>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager" runat="server">
<Services>
<asp:ServiceReference Path="~/Service1.svc" />
</Services>
</asp:ScriptManager>
</div>
</form>
</body>
</html>
Code fails on WebApplication1.Service1.DoWork(counter, ResultLoadMainGridProductType, ErrorLoadMainGridProductType);
Error: Error of implementation of Microsoft Jscript: "WebApplication1" is not certain.
WebApplication1 - the namespace... then I watch it it undefined on javascript code working.
How make it be there??
WebApplication1.Service1.DoWorka serverside method?