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 509k
  • Answers 509k
  • 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 The coordinate systems of UIImage and CG contexts are flipped… May 16, 2026 at 4:37 pm
  • Editorial Team
    Editorial Team added an answer My mistake, padding was working correctly. Just didn't appear to… May 16, 2026 at 4:37 pm
  • Editorial Team
    Editorial Team added an answer I don't understand what do you mean by "cannot join… May 16, 2026 at 4:37 pm

Trending Tags

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

Top Members

Related Questions

I have this piece of code: Page.ClientScript.RegisterClientScriptInclude(this.GetType(), Guid.NewGuid().ToString(), this.ResolveUrl(~/Scripts/min.js)); When we push to our
I have a master page that adds the jquery library via a registerclientscriptinclude: Page.ClientScript.RegisterClientScriptInclude(this.GetType(),
I have to call javascript function from javascript file codebehind .aspx page . Presently
On this page http://church.allthingswebdesign.com/Calendar.php the last row of the table is bigger than the
On this page I read the following: A unit of work is a design
This is the page, its a wordpress powered site: http://bit.ly/9oJXWV You select some value,
In my master page i've a textbox. <asp:TextBox ID=SearchTextBox runat=server class=searchtxtbox onfocus=HideSearchWaterMark(); Text=Search onblur=ShowSearchWaterMark(this);
Ok, I downloaded the WestWind Ajax Controls, and I added this to my web.config:
string jSFile = ResolveUrl(~/MyProject/JavaScripts/dir/test.js); if (!System.IO.File.Exists(jSFile)) { ... } This code doesn't work and
I've used the code in this article before to create a custom validator to

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.