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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T21:04:05+00:00 2026-05-15T21:04:05+00:00

how can i get multiview in javascript or jquery ? below code always returns

  • 0

how can i get multiview in javascript or jquery ?

below code always returns null : (Javascript)

var MultiView = document.getElementById("MultiView1");

and below code is not null but not work :(jquery)

var MultiView = $("*[id$='TextBox1']"); 

what is the going on about that?

can u give me plz a sample code for checking ActiveViewIndex With JavaScript or Jquery!

i added the below code because of comment :

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Keyup._Default" %>

<!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></title>

    <%--    <script src="JQuery/jquery-1.4.1.js" type="text/javascript"></script>--%>
                <script type="text/javascript">

                    document.onkeyup = onkeyupOfDocument;

                    function onkeyupOfDocument(evt) {
                        var evt = evt || window.event;
                        //alert(evt.keyCode);
                        //var MultiView = $("*[id$='TextBox1']"); 
                        var MultiView = document.getElementById("MultiView1");
                        alert(MultiView);
                    }

        </script>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
                <asp:View ID="View1" runat="server">
                        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                </asp:View>
                <asp:View ID="View2" runat="server">
                </asp:View>
            </asp:MultiView>
        </div>
        </form>
    </body>
    </html>

thanks in future advance

  • 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-15T21:04:06+00:00Added an answer on May 15, 2026 at 9:04 pm

    Sorry for the delay but here is what you are looking for :

        <%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
        CodeFile="Default.aspx.cs" Inherits="_Default" %>
    
    <asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
        <script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
        <script type="text/javascript">
            $(function () {
    
                var activeViewIndex = $('.multiviewContainer').attr('activeKey');
    
                alert(activeViewIndex);
    
            });
        </script>
    </asp:Content>
    <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    
        <asp:Panel runat="server" ID="multiviewContainer" CssClass="multiviewContainer">
    
            <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
    
                <asp:View ID="View1" runat="server">
                       View 0
                </asp:View>
    
                <asp:View ID="View2" runat="server">
                       View 1
                </asp:View>
    
                <asp:View ID="View3" runat="server">
                       View 2
                </asp:View>
    
                <asp:View ID="View4" runat="server">
                       View 3
                </asp:View>
    
            </asp:MultiView>
    
        </asp:Panel>
    
    </asp:Content>
    

    and code behind:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string activeView = MultiView1.ActiveViewIndex.ToString();
            multiviewContainer.Attributes.Add("activeKey", activeView);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

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

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

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

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

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer for(i=0;i<n;i++) { pthread_create(&threadIdArray[i],NULL,runner,NULL); if(i==n-2)printf("breakdown imminent!\n"); if(i==n-1)printf("breakdown already occurred!\n"); } Nothing… May 16, 2026 at 10:40 pm
  • Editorial Team
    Editorial Team added an answer I imported the default "Visual C# Development Settings" (.vssettings) and… May 16, 2026 at 10:40 pm
  • Editorial Team
    Editorial Team added an answer Write up the document in Word, or your favorite document… May 16, 2026 at 10:40 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 can get individual frames from the iPhone's cameras just fine. what I need
I can get a parameter('id' for example) by $request->getParameter('id'); but if I use a
Can anyone tell me how I can get the number of unread items in
Can someone please tell me how I can get the changeset number, the current
Though we can get the feel of virtual function by inheriting a class and
In C# I can get the current user of a web app using the
does anyone know if you can get individual field comments from mysql using Zend
In SSMS, how can I get SSMS to show row numbers for a batch?
Facebook now offer subscriptions to users so you can get realtime updates on changes.
I'm trying to lock down PowerPoint and I can get rid of some of

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.