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 1011047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T09:10:34+00:00 2026-05-16T09:10:34+00:00

Or any viable workaround. So, imagine a Master page that implements IFooMaster with a

  • 0

Or any viable workaround.

So, imagine a Master page that implements IFooMaster with a method ShowFancyMessagePopupTheBusinessCantLiveWithout(string message);

I am in a page that inherits this master page. Upon a checkbox being unchecekd, I want to show a message to the user that if they save it, they can’t re-check the checkbox without some admin action.

I’ve been given feedback that I can’t just use an alert('message'); in javascript because they want the consistent look of these messages.

Next, I tried to make an ajax call via PageMethods (as that’s what everything else in this codebase uses) to show a message. My problem lies in this method being static.

[WebMethod]
public static void ShowSuperImportantMessage()
{
     if(!checkboxICareAbout.Checked)
         ((IFooMaster)Master).ShowFancyMessagePopupTheBusinessCantLiveWithout("If you uncheck that thing, you can't recheck it.");
}

Since ShowSuperImportantMessage() is static, I can’t access Master from within.

The method on the master page looks more or less like this:

public void ShowFancyMessagePopupTheBusinessCantLiveWithout(string message)
{
    lblGenericMessage.Text = message;
    btnGenericMessageOK.Focus();
    upGenericMessage.Update();
    mpeGenericMessage.Show();
}

mpeGenericMessage is an ajaxtoolkit:ModalPopupExtender.

upGenericMessage is an update panel.

The other 2 are obvious.

Any ideas? Can I do some jQuery kung-fu to show that stuff? I tried, but the solution complained that the controls I tried to refer to by ClientID didn’t resolve since they were on the Master page.

quick edit: Before anyone tells me the architecture is a problem, or I shouldn’t have put such a thing on a master page, or w/e…

I know the situation is not ideal, but I this is inherited code, and I can’t drop it all and rewrite half of their web stack.

  • 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-16T09:10:35+00:00Added an answer on May 16, 2026 at 9:10 am

    Sorry to take so long to respond/answer.

    I’m not proud of this at all, mind you, but the eventual solution was to hardcode the client IDs into the jQuery that pulled up the modal dialog on the master page.

    Like I said, I’m not proud of this dirty, dirty fix. However, the consolation is that, since it’s on the master page, there isn’t really any naming container above it. As such, it’s much less likely to run into problems with the clientID changing.

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

Sidebar

Related Questions

Any idea why this code: extern C __declspec(dllexport) void Transform(double x[], double y[], int
Any suggestions on how I can cleanup the following code pattern that repeats multiple
Question I wish to know if this is a viable way to implement variable
Given that strongly typed ActionLink is not viable ( Strongly Typed ActionLink In Asp.Net
Is there any viable reason why serialVersionUID field is not named SERIAL_VERSION_UID? According to
Although this is a Java-centric question it really applies to any system utilizing a
I've got a couple projects that were built using hookbox to manage real-time message
I'm wondering is there any way in XCode to control the resources that are
In a plot(x,y) is there any way to plot a line/curve/function that would split
(This question is over 6 years old and probably no longer has any relevance.)

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.