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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:32:06+00:00 2026-06-11T20:32:06+00:00

I am having a web page and i applied script manager on it. On

  • 0

I am having a web page and i applied script manager on it. On the page load i am checking some condition and showing a Javascript ShowModalDialog from code and it is working fine.

int isAnyNonProdTaskActive = _nonProduction.IsAnyTaskActive(UserIDFromDB);
            if (isAnyNonProdTaskActive > 0)
            {
                //Displays and Logs Message
                _loggerDetails.LogMessage = "EmployeeQuotient.Production.Page_Load()     One NonProduction incomplete task found, NonProductionTimeEntryID : " + isAnyNonProdTaskActive.ToString();
                _writeLog.LogDetails(_loggerDetails.LogLevel_Info, _loggerDetails.LogMessage);

                Session["TaskActiveNonProd"] = isAnyNonProdTaskActive;
                Page page = HttpContext.Current.CurrentHandler as Page;

                //Displays and Logs Message
                _loggerDetails.LogMessage = "EmployeeQuotient.Production.Page_Load()     Opening ElapsedClockNonProd.aspx to complete the incomplete task id :" + isAnyNonProdTaskActive.ToString();
                _writeLog.LogDetails(_loggerDetails.LogLevel_Info, _loggerDetails.LogMessage);

                ScriptManager.RegisterStartupScript(page, page.GetType(), "OpenModalDialog", "<script type=text/javascript>window.showModalDialog('ElapsedClockNonProd.aspx?code=" + isAnyNonProdTaskActive.ToString() + "', null, 'unadorned:yes ;resizable:0 ;dialogWidth:300px ;dialogHeight:300px ;status:no ;scroll:no ;status=no;'); </script>", false);
            }

The same code i am applying on a Button on the same page then i am getting error.The error message is :- Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: The script tag registered for type ‘ASP.associates_production_aspx’ and key ‘OpenModalDialog’ has invalid characters outside of the script tags: window.showModalDialog(‘ElapsedClockNonProd.aspx?code=464’, null, ‘unadorned:yes ;resizable:0 ;dialogWidth:300px ;dialogHeight:300px ;status:no ;scroll:no ;status=no;’); . Only properly formatted script tags can be registered.

Guide me that how i fix this error.I am not getting that why on the button click it is not working but while page load the same script is working without any issues..

  • 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-06-11T20:32:07+00:00Added an answer on June 11, 2026 at 8:32 pm
    ScriptManager.RegisterStartupScript(page, page.GetType(), "OpenModalDialog", "<script type='text/javascript'>window.showModalDialog('ElapsedClockNonProd.aspx?code=" + isAnyNonProdTaskActive.ToString() + "', null, 'unadorned:yes ;resizable:0 ;dialogWidth:300px ;dialogHeight:300px ;status:no ;scroll:no ;status=no;'); </script>", false);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web page that is having some javascript issues. I have tried
I found a web page with its source code having the first line as:
I am having trouble fetching content from a web-page, actually i wanted to fetch
I have a lot of DIVs having some data in my web page &
I have web page having 1000's of images and values. Whenever I load the
I'm having an odd issue. I have a simple web page, and for some
I have a form on top of the web page having some field with
I'm having some issues reading a web page synchronously in a XNA game for
I'm having some trouble with my web page. A picture probably descibes it best
im my web page having file upload option..it has to check two conditions. 1)whether

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.