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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:48:55+00:00 2026-05-13T10:48:55+00:00

this.Page.ClientScript.RegisterClientScriptInclude(utility.popupUrl(CaptchaLogin.aspx),);

  • 0

this.Page.ClientScript.RegisterClientScriptInclude(“utility.popupUrl(CaptchaLogin.aspx)”,””);

  • 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-13T10:48:56+00:00Added an answer on May 13, 2026 at 10:48 am

    Nope, that’s not right. When you register a client script include you’re supposed to supply a url to a javascript file that contains the code you want to execute. That will render as <script type="text/javascript" src="your url..."></script>

    What you want to do is RegisterScriptBlock. In that method, you also need to make sure you’re passing the generateScriptTags flag (or what it’s called) as true.

    EDIT

    With regards to your comment, I don’t know exactly what you wanted the script to do, but it looks like you tried to register a script block and a script include, which a) won’t go, and b) wasn’t part of your original question. I’ll try to reply step by step on things you need to change:

    The first parameter, type, should generally be a reference to a page type. If you’re in a user control, you can achieve this by this.Page.GetType(), if you’re in a page, this.GetType() will suffice. Regardless of where you are, you could do typeof(System.Web.UI.Page)

    The second parameter is not supposed to contain any actual script; it is just a key to identify the script. You want to be able to identify the script, so that you can, say, check if it is registered, as in the example below. You can choose pretty much whatever to be your key, just as you choose, say, variable names.

    The third parameter is your actual script. If you pass the fourth parameter as true, it can just be a piece of javascript. If the value of the fourth parameter is false you will need to manuallly include the <script> tags in your third parameter.

    if(!ClientScript.IsClientScriptBlockRegistered("CaptchaLogin"))
        ClientScript.RegisterClientScriptBlock(typeof(Page), "CaptchaLogin", "utility.popupUrl('CaptchaLogin.aspx');", true);
    

    Now, to include the script file FailLogin.js, you cannot use RegisterClientScriptBlock at all. You will need to use RegisterClientScriptInclude as in your original post. Here, the first parameter is also just a key. No script goes in there at all. The second parameter is the URL to the file you want to include:

    ClientScript.RegisterClientScriptInclude("CaptchaInclude", "/Public/JS/FailLogin.js");
    

    I should add that I’m not sure whether you can use the tilde, ~, to quantify your url in RegisterClientScriptInclude, perhaps you can. I am sure, however, that you can definitely not use it in a string the way you did in the code you posted in the comment to this answer.

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

Sidebar

Ask A Question

Stats

  • Questions 336k
  • Answers 336k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer If you've tried to create the trigger before, as outis… May 14, 2026 at 3:51 am
  • Editorial Team
    Editorial Team added an answer The extrema of the bounding box of your arc are… May 14, 2026 at 3:51 am
  • Editorial Team
    Editorial Team added an answer XmlSerializer may be a useful first thing to try, if… May 14, 2026 at 3:51 am

Related Questions

I have an ASP.NET server control which relies on JQuery for certain functionality. I've
Hi I recently fell in love with an extended upload button control I found
I have a master page that adds the jquery library via a registerclientscriptinclude: Page.ClientScript.RegisterClientScriptInclude(this.GetType(),
Ok, I downloaded the WestWind Ajax Controls, and I added this to my web.config:
The included script references, in particular jQuery, are being rendered after viewstate. Is there

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.