Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6591837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:28:37+00:00 2026-05-25T17:28:37+00:00

I am developing a set of new pages for an existing (and large) web

  • 0

I am developing a set of new pages for an existing (and large) web app and am making them much more HTML and JQuery-centric than we’ve done before. For example, there are NO server controls and I am not using ViewState – everything is done in standard HTML. I’ve created the first page and it works great. It has lots of explicit ajax calls into static methods on the ASPX code-behind class to get or store data and these work fine.

Before I branch out to the remaining pages, I am placing a fair amount of the page into a Master page and the callbacks for these components into the Master page code-behind. However, any function call to a static method on the master page is failing. I could just move these methods to an ASMX web service page but now my curiosity is piqued and I’d like to understand why calls to methods in the aspx page work but calls to methods defined on the master page do not.

This is not an issue of identifying DOM elements (most of the questions around this topic are about DOM element access). It is a question about why an AJAX callback to “SaveWeightData” works when the method is defined on the page but fails when the method is defined on the master page:

$.ajax({
      type: "POST",
url: "<%=PageName%>/SaveWeightData",
      data: "{'weightItem':" + JSON.stringify(newWeight) + "}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) {
                    alert("Success!");
         },
error: function (xhr, ajaxOptions, thrownError, request, error) {
                alert('xrs.status = ' + xhr.status + '\n' +
                'thrown error = ' + thrownError + '\n' +
                'xhr.statusText = ' + xhr.statusText + '\n' +
                'request = ' + request + '\n' +
                'error = ' + error);
    }
      })

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T17:28:37+00:00Added an answer on May 25, 2026 at 5:28 pm

    A master page becomes a UserControl at runtime under the Page object. UserControls cannot host WebMethods.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing a new set of web services at my company. My manager asked
I'm new to jQuery and PHP. I'm developing a web page to display a
I'm developing my Android app with target set to 15, but would still like
I'm trying to set up a rails 3.2 app with the new compass-rails gem
I'm developing a site and fairly new to jquery. For some reason, when I
Am learning AppEngine and have started developing new app and want to clarify something.
I have a client who recycles cans. We're developing a new web site for
I want to start developing JSP pages. I need to set up a localhost
I'm new to the asp.net. I'm developing one web site which is having diffenent
I'm developing a java EE web app using JSF with a shopping cart style

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.