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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T04:04:15+00:00 2026-06-07T04:04:15+00:00

Here is my ascx page with embedded javascript. I’d like to highlight the view

  • 0

Here is my ascx page with embedded javascript.

I’d like to highlight the view which I have wrapped in a div tag (div2 for test purposes) when the view changes.

As of now the views change fine, but I cannot get the highlight to work.

Is something wrong with my javascript or am I missing something else??

Thanks

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>



<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:MultiView ID="MultiView1" runat="server">

<asp:View ID="View1" runat="server">
   <p>This is View 1</p>
   <asp:Button ID="Button1" runat="server" Text="Next" onclick="Button1_Click" />
 </asp:View>


 <asp:View ID="View2" runat="server">
    <div id="div2" style="height:auto; width:auto;">
    <p>This is View 2</p>
    <asp:Button ID="Button2" runat="server" Text="Previous" 
        onclick="Button2_Click" />  
    <asp:Button ID="Button3" runat="server" Text="Next" onclick="Button3_Click" /> 
    </div>

    <script type="text/javascript">
    $(document).ready(function () {
    $("#Button1").click(function () {
    $("#div2").effect("highlight", {}, 3000);
    });
    });
    </script>

 </asp:View>


 <asp:View ID="View3" runat="server">
    <p>This is View 3</p>
    <asp:Button ID="Button4" runat="server" Text="Previous" 
        onclick="Button4_Click1" />

 </asp:View>

 </asp:MultiView>

  </ContentTemplate>
 </asp:UpdatePanel> 

Code Behind:

namespace Multiview1.Multiview1
{
public partial class Multiview1UserControl : UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        MultiView1.SetActiveView(View1);
    }

   protected void Button1_Click(object sender, EventArgs e)
    {
        MultiView1.SetActiveView(View2);
        UpdatePanel1.Update();
    }

    protected void Button3_Click(object sender, EventArgs e)
    {
        MultiView1.SetActiveView(View3);
        UpdatePanel1.Update();
    }

    protected void Button2_Click(object sender, EventArgs e)
    {
        MultiView1.SetActiveView(View1);
        UpdatePanel1.Update();
    }

    protected void Button4_Click1(object sender, EventArgs e)
    {
        MultiView1.SetActiveView(View2);
        UpdatePanel1.Update();
    }
  }
 }
  • 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-07T04:04:15+00:00Added an answer on June 7, 2026 at 4:04 am

    The problem appears to be loading multiple versions of jquery.

    I’ve set up a fiddle to show the issue. When the 2nd jquery library is commented out it works fine when it’s not it doesn’t work at all.

    Jsfiddle

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

Sidebar

Related Questions

I have radGrid in .ascx page in which I want to find the control
Here is the Javascript I currently have <script type=text/javascript> $(function() { $('.slideshow').hover( function() {
I've got an ASPX page rendering a search ascx page which in turn will
Here's the scenario: I've got a regular hyperlink on my .ascx. (no I have
I have a aspx page (default.aspx), inside which I am loading a user control
I have HTML table on the ASP.NET MVC View page. Now I have to
Suppose there is a user control in a page called Paging.ascx that is embedded
So here is the issue. I have a DropDownList in a .ascx control with
I must be missing a trick here. I have an .aspx page (that uses
In my asp .net C# project I have a page defualt.aspx on which I

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.