%@ 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>
코드가 실패합니다. WebApplication1.Service1.DoWork(counter, ResultLoadMainGridProductType, ErrorLoadMainGridProductType);
오류 : Microsoft Jscript : "WebApplication1"구현 오류가 확실하지 않습니다. WebApplication1 - 네임 스페이스 ... 자바 스크립트 코드에서 정의되지 않은 것을 볼 수 있습니다. 어떻게 만들 수 있을까요 ??asp.net web에서 javascript에 네임 스페이스를 가져 오는 방법은 무엇입니까?
'WebApplication1.Service1.DoWork'는 서버 측 메소드입니까? –