Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Menu updating multiview in updatepanel + progresspanel

$
0
0

Hi all

I have a menu that selects the visible view of a multiview, everything is enclosed in an updatepanel. This is working fine but the progresspanel is not working, here is the code:

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeFile="New.aspx.cs" Inherits="Part" %><asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server"><style type="text/css">
         .overlay
        {
          position: fixed;
          z-index: 98;
          top: 0px;
          left: 0px;
          right: 0px;
          bottom: 0px;
          background-color: #aaa;
          filter: alpha(opacity=80);
          opacity: 0.8;
        }
        .overlayContent
        {
          z-index: 99;
          margin: 250px auto;
          width: 80px;
          height: 80px;
        }
        .overlayContent h2
        {
            font-size: 18px;
            font-weight: bold;
            color: #000;
        }
        .overlayContent img
        {
          width: 80px;
          height: 80px;
        }
        }</style>
</asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"><asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager><asp:Menu ID="Menu1" runat="server" CssClass="menu" IncludeStyleBlock="False" 
        onmenuitemclick="Menu1_MenuItemClick" Orientation="Horizontal" 
        StaticSubMenuIndent="16px" style="font-size: small"><StaticSelectedStyle BackColor="LightBlue" BorderStyle="Solid" BorderColor="Black" /><Items><asp:MenuItem Text="View 1" Value="0"></asp:MenuItem><asp:MenuItem Text="View 2" Value="1"></asp:MenuItem><asp:MenuItem Text="View 3" Value="2"></asp:MenuItem><asp:MenuItem Text="View 4" Value="3"></asp:MenuItem><asp:MenuItem Text="View 5" Value="4"></asp:MenuItem></Items></asp:Menu><asp:UpdatePanel ID="UpdatePanel1" runat="server" ><ContentTemplate><asp:MultiView ID="MultiView1" runat="server"><asp:View ID="View1" runat="server">
            This is view 1</asp:View><asp:View ID="View2" runat="server">
        This is view 2   </asp:View><asp:View ID="View3" runat="server">
            This is vew 3</asp:View><asp:View ID="View4" runat="server">
            THis is view 4</asp:View><asp:View ID="View5" runat="server">
            This is view 5</asp:View></asp:MultiView></ContentTemplate><Triggers><asp:AsyncPostBackTrigger ControlID="Menu1"  /></Triggers></asp:UpdatePanel><asp:UpdateProgress ID="UpdateProgress1" runat="server" DisplayAfter="0" AssociatedUpdatePanelID="UpdatePanel1"><ProgressTemplate><div class="overlay" /><div class="overlayContent"><h2>Loading...</h2><img src="image.gif" alt="Loading" border="1" /></div></ProgressTemplate></asp:UpdateProgress></asp:Content>

Code behind:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Part
{
    public partial class New : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            MultiView1.ActiveViewIndex = 0;


        protected void Menu1_MenuItemClick(object sender, MenuEventArgs e)
        {
            MultiView1.ActiveViewIndex = Int32.Parse(e.Item.Value);
        }

Seems to me there is a problem with the triggers, any help please?

Kind regards




Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>