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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T15:04:45+00:00 2026-05-19T15:04:45+00:00

i have the following function in default.aspx…..i have webusercontrol which have 10 checkboxes and

  • 0

i have the following function in default.aspx…..i have webusercontrol which have 10 checkboxes and 1 button …. i want when i click on button1 of user control then it can access the function of default.aspx …page …if i dragged the usercontrol to default.aspx

Normally if i use 10 checkboxes and 1 button in default.aspx then it works fine … if i use 10checkboxes and 1button in usercontrol then drag that usercontrol in default.aspx then it will not work ..

what was the problem …how to fix this ?

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %>

<%@ Register src="WebUserControl.ascx" tagname="WebUserControl" tagprefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>

        <uc1:WebUserControl ID="WebUserControl1" runat="server" />

    </div>
    </form>
     <script src ="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"></script>
      <script type="text/javascript">

      $("#'<%=Button1.ClientID %>'").click(function(){

    var vCheckedCBCount =  $("input:checkbox").filter(function(index){ 
    return $(this)[0].checked == true;
    }).length;
    if(vCheckedCBCount > 1)
    {
        alert('You cannot check more than 1 check box.');
        return false;
    } 
});
 </script >
   </body>
</html>
  • 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-19T15:04:46+00:00Added an answer on May 19, 2026 at 3:04 pm

    Try this one –>

    ————————————ASPX Code——————————————————————————

    ASPX:

    <%@ Register Src="~/UserControl/WebUserControl.ascx" TagName="ucCheckBox" TagPrefix="UC" %>
    
    <UC:ucCheckBox ID="ucCheckBox" runat="server" />
    

    JAVASCRIPT:

    $(document).ready(function(){
    
        $("input:submit[id$='btnSubmit']").click(function(){
    
            var vCheckedCBCount =  $("input:checkbox").filter(function(index){
            return $(this)[0].checked == true;
            }).length;
            if(vCheckedCBCount > 5)
            {
                alert('You cannot check more than 5 check box.');
                return false;
            } 
        });
    });
    

    ————————————ASPX Code——————————————————————————

    ——————————-User control code————————————–

    UserControl:

    <%@ Control Language="C#" AutoEventWireup="true" CodeFile="WebUserControl.ascx.cs" Inherits="UserControl_WebUserControl" %>
    <asp:CheckBox ID="CheckBox1" runat="server" /><br />
    <asp:CheckBox ID="CheckBox2" runat="server" /><br />
    <asp:CheckBox ID="CheckBox3" runat="server" /><br />
    <asp:CheckBox ID="CheckBox4" runat="server" /><br />
    <asp:CheckBox ID="CheckBox5" runat="server" /><br />
    <asp:CheckBox ID="CheckBox6" runat="server" /><br />
    <asp:CheckBox ID="CheckBox7" runat="server" /><br />
    <asp:CheckBox ID="CheckBox8" runat="server" /><br />
    <asp:CheckBox ID="CheckBox9" runat="server" /><br />
    <asp:CheckBox ID="CheckBox10" runat="server" /><br />
    <asp:Button ID="btnSubmit" runat="server" Text="Continue" />
    

    ——————————-User control code————————————–

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

Sidebar

Related Questions

i have default.aspx page and one user control. usercontrol is having following code for
I have the following function to remove a DOM element div, $('#emDiv').on(click, ':button[data-emp-del=true]', function
i have the following function to override the default save function in a model
Following the good jQuery Plugins/Authoring instructions I have a little question (function($){ // Default
i have an aspx page containing following code <body> <script language=javascript type=text/javascript> function Hidee()
I have the following pages: default.aspx widgets/rss.aspx The rss.aspx gets dynamically loaded into a
I have the following function which fetches more comments beyond the 20 that are
So I have a master page which has the following function '# Get and/or
I have following code snippet in jquery.In which,I want to animate each element of
I have the following jquery code $(document).ready(function() { //Default Action $(#playerList).verticaltabs({speed: 500,slideShow: false,activeIndex: <?=$tab;?>});

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.