Skip to content Skip to sidebar Skip to footer

Jquery Ajax Pagemethod Not Working

I'm using page method to retrieve login information. My code goes as follows, $.ajax( { type: 'POST', url: Main.url + loginBox.url , data: '{'jsonrpc': '2.0', 'method': 'lo

Solution 1:

Use this syntax:

var pageUrl = '<%=ResolveUrl("~/Home.aspx")%>'
              $.ajax({
                  type: "POST",
                  url: pageUrl + '/UpdateWlcomMessage',
                  data: '{WelcomeText: "' + welocmetext + '"}',
                  contentType: "application/json; charset=utf-8",
                  dataType: "json",
                  success: function (data) {
                  }
              });

Post a Comment for "Jquery Ajax Pagemethod Not Working"