//call webservice example from web var PageMethods = function () { PageMethods.initializeBase(this); this._timeout = 0; this._userContext = null; this._succeeded = null; this._failed = null; } PageMethods.prototype = { _get_path: function () { var p = this.get_path(); if (p) return p; else return PageMethods._staticInstance.get_path(); }, GetDate: function (succeededCallback, failedCallback, userContext) { return this._invoke(this._get_path(), 'GetDate', false, {}, succeededCallback, failedCallback, userContext); } } PageMethods.registerClass('PageMethods', Sys.Net.WebServiceProxy); PageMethods._staticInstance = new PageMethods(); // Generic initialization code omitted for brevity. PageMethods.set_path("WebService1.asmx"); PageMethods.GetDate = function (onSuccess, onFailed, userContext) { PageMethods._staticInstance.GetDate(onSuccess, onFailed, userContext); } //end example function CallPlsql() { this.ShowText = function (text) { return text; } this.ShowUrl = function () { var pageUrl = '<%=ResolveUrl("~/CallPlsql.cs")%>'; alert(pageUrl); } this.CallAjax = function () { alert("test call cs"); var tt = $("#ctl00_ContentPlace_dsList_Repeater1_ctl01_DESCRIPTION").val(); alert(tt); $.ajax({ type: "POST", url: '../../../CallPlsql.aspx/HelloWorld', dataType: "json" //dataType: "json", //data: data,dataType: dataType, // success: function (returnValue) { // alert(returnValue); // } }).done(function (returnValue) { alert(returnValue); }).fail(function () { alert("error"); }); } }