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

  • Home
  • SEARCH
  • 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 1005307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T08:16:28+00:00 2026-05-16T08:16:28+00:00

I want to alert 1 registering the scripts in this order ScriptManager.RegisterClientScriptBlock(this, this.GetType(), a,

  • 0

I want to alert 1 registering the scripts in this order

ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "a", "alert(a);", true);
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "b", "var a = 1;", true);

But doing this causes a error saying a is undefined.

I have different controls located in different parts of the page registering scripts, and some of them need to go first and others need to go last.

Is there a way to set order it will render?

  • 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-16T08:16:29+00:00Added an answer on May 16, 2026 at 8:16 am

    No, it’s not possible to define the order in which the RegisterClientScriptBlock methods are called. From the documentation for the ScriptManager.RegisterClientScriptBlock method (emphasis mine):

    The script blocks are not guaranteed
    to be output in the order they are
    registered
    . If the order of the script
    blocks is important, use a
    StringBuilder object to gather the
    scripts together in a single string
    ,
    and then register them all in a single
    client script block.

    Also, you may want to define a different key (second parameter; "a") for the second invocation of RegisterStartupScriptBlock, since a registered script is uniquely identified by its key. If you’re calling this method with your parameters, ScriptManager won’t register the second script, because another script with the same key ("a") has already been registered.

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

Sidebar

Related Questions

I have made this code working but I want to have an alert ,
I want to alert the user whenever there's an AJAX error. You can do
I have a variable i=28.57142857142857; I want to alert(i); alert this variable on user
I just want to alert when user hit enter key. I tried this one
In my program I want this alert dialog to show after 3000ms. how can
hey every one I want to alert value of n from this string $('.orbit-bullets:has(
I have this fiddle. I want to alert the background. How can I? Thanks.
I have this code and actually i want an alert message when user Tap
I'm creating a Chrome extension using user's key event. But I want to alert
I want to alert different word base on different actions, but it doesn't work.

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.