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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:09:23+00:00 2026-06-04T07:09:23+00:00

I have the following Jquery running in an aspx page without the use of

  • 0

I have the following Jquery running in an aspx page without the use of a master page. The markup, with script is below. It works just fine.

<body>
<form id="form1" runat="server">
<div>

    <asp:CheckBox ID="chkAll" runat="server" Text="Check All" /><br />

    <asp:CheckBoxList ID="cbList" runat="server">
    </asp:CheckBoxList>

</div>
</form>

Here is the script

<script src="Scripts/jquery-1.7.2.js" type="text/javascript"></script>

<script type="text/javascript">
    $(document).ready(function () {
        $('#chkAll').click(
         function () {
             $("INPUT[type='checkbox']").attr('checked', $('#chkAll').is(':checked'));
         });
    });    

 </script>

Here is the markup for the page i created using a master page. The master page only has the reference to the jquery file in the header in the HeadContent placeholder. Needless to say it doesnt work in the master page scenario. Why is the question

 <asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
   The identical script from above is placed here

</asp:Content>

And here is the placeholder content markup

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">

<div>

    <asp:CheckBox ID="chkAll" runat="server" Text="Check All" /><br />

    <asp:CheckBoxList ID="cbList" runat="server">
    </asp:CheckBoxList>

</div>
</asp:Content>
  • 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-04T07:09:24+00:00Added an answer on June 4, 2026 at 7:09 am

    Using ClientIDMode="Static" on your control should allow you to reference it by the name you assigned.

    <asp:CheckBox ID="chkAll" runat="server" Text="Check All" ClientIDMode="Static" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following jQuery code: $(body.page-calendar-practices-2012-05 #content-header h1#title) which works fine. I can
The following script below is not running in IE7 but works perfectly fine in
I have the following code in a jQuery JavaScript document running on a page
I am running rails 3.1 and have the following jquery script in a file
I have the following jquery script: $(function(){ $('#top-menu').on('click', 'a.change-menu', function(e){ e.preventDefault() $(#menu-change-div).load($(this).attr(href)); }); });
I have the following jquery code: $(document).ready(function() { $(body[class*=page-calendar-practices] #content-header h1#title).after(<div id='athletics_practice-schedule'><div id='inner-title'><a href='www.example.com'
Just a quick question... I currently have the following jQuery code with a selector
I have the following html/javascript stuff <html> <script type=text/javascript src=jquery-1.7.1.min.js></script> <script type=text/javascript> $(document).mouseup(function(event) {
I have the following jQuery <script type=text/javascript> jQuery(function(){ jQuery('.link1').click(function(){ jQuery('.hide-div').hide(); jQuery('.toggle1').show(); jQuery('#arrow').css({top: '0px'}); });
I have the following script which I am running. It loops through each table

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.