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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:12:10+00:00 2026-05-27T23:12:10+00:00

<%@ Page Title= Language=C# MasterPageFile=~/Content/Master1.Master AutoEventWireup=true Inherits=System.Web.Mvc.ViewPage<List<TGF.class.abc>> %> <asp:Content ID=Content1 ContentPlaceHolderID=MainContent runat=server> <script type=text/javascript>

  • 0
<%@ Page Title="" Language="C#" MasterPageFile="~/Content/Master1.Master" AutoEventWireup="true" Inherits="System.Web.Mvc.ViewPage<List<TGF.class.abc>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

<script type="text/javascript">

    $(document).ready(function() {

        $('#tabContainer').tabs();

        $('#tab1').click(function() {
            GetInfo('method1', '#info1');
        });

        $('#tab2').click(function() {
            GetInfo('method2', '#info2');
        });

        $('#tab3').click(function() {
            GetInfo('method3', '#info3');
        });

    });


    function GetInfo(url, div) {
        debugger;
        $(div).html('Loading...');

        $.ajax({
            Type: 'POST',
            url: url,
            success: function(html) {
                $(div).html(html);
            },
            error: function(html) {
                $(div).html('An Error Occurred.');
            },
            cache: false
        });

    }

</script>

<div id="tabContainer">

    <!-- Tab Names -->
    <ul>
        <li><a id='tab1' href="#info1"><span>name1</span></a></li>
        <li><a id='tab2' href="#info2"><span>name2</span></a></li>
        <li><a id='tab3' href="#info3"><span>name3</span></a></li>
    </ul>

    <div id="info1">
        <% Html.RenderPartial("Mysharedpage", Model, ViewData); %>
    </div>

    <div id="info2">
      <% Html.RenderPartial("Mysharedpage", Model, ViewData); %>
    </div>

    <div id="info3">
   <% Html.RenderPartial("Mysharedpage", Model, ViewData); %>
    </div>

</div>

Here is my shared page (Mysharedpage.ascx) ,

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<List<TGF.dfg.method>>" %>

<%@ Import Namespace="class.DataContracts" %>
<script type="text/javascript" language="javascript">
    $(document).ready(function () {
        debugger;
        $("#SelectAll").click(CheckAll);
    });
       function CheckAll() {
            $("INPUT[type='checkbox']").attr('checked', $('#SelectAll').is(':checked'));
        }



</script>

Now, the issue is when I click tab1 then it works as usual, i.e. the CheckAll() function on the shared page (Mysharedpage.ascx) works. But when I click on tab2 or tab 3 , the Jquery CheckAll() function is not called and is not working.
Basically the Jquery is not getting called when clicked on tab2 or tab3. All the 3 tab call the same shared (.ascx) page

Any solution ?

  • 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-27T23:12:11+00:00Added an answer on May 27, 2026 at 11:12 pm

    the reason is event handlers do not attach themselves to the dynamically added elements to the page try

    $("#SelectAll").on("click",CheckAll);
    

    http://api.jquery.com/on/

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

Sidebar

Related Questions

<%@ Page Title= Language=C# MasterPageFile=~/Masterpages/main.Master AutoEventWireup=true Inherits=KPIGen.admin.Data_Parameter_List Codebehind=Data_Paramater_List.aspx.cs %> <%@ MasterType VirtualPath=~/Masterpages/main.Master %> <%@
I have a page like this: <%@ Page Title= Language=C# MasterPageFile=~/TekContent.master AutoEventWireup=true CodeFile=Default.aspx.cs Inherits=_Default
I have the following dropdownlist: <%@ Page Title= Language=C# MasterPageFile=~/myMasterPage.master AutoEventWireup=true CodeFile=testdropdown.aspx.cs Inherits=testdropdown %>
I have the next aspx page: <%@ Page Title= Language=C# MasterPageFile=~/MasterPage.Master AutoEventWireup=true CodeBehind=newsEditor.aspx.cs Inherits=ExpertSiteV2.newsEditor
On the base.master: <%@ Master Language=C# AutoEventWireup=true CodeBehind=Base.master.cs Inherits=WebApplicationControlTest.Base %> <!DOCTYPE html PUBLIC -//W3C//DTD
By default, when you print a web page, the page title and and URL
I have a site for testing Ajax... and it works: <%@ Page Title= Language=C#
Situation: I have a master page which has 3 content place holder but no
How can I retrieve the page title of a webpage (title html tag) using
I try to add dots between the page title and the page number in

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.