Bug: Content Page MultiViews

Last post 07-25-2006 11:43 AM by andymarks. 7 replies.

Sort Posts:

  • Bug: Content Page MultiViews

    03-26-2006, 9:25 AM
    • Member
      15 point Member
    • Darc
    • Member since 03-26-2006, 2:11 PM
    • Pataskala, OH USA
    • Posts 3
    I *think* I found a bug.  Let me describe its behavior:

    This works:
    On a master page, I have an atlas:ScriptManager control, as required on each page.  I also have an atlas:UpdatePanel and an atlas:UpdateProgress control on this page, with an asp:Calendar control in the atlas:UpdatePanel, Mode set to Conditional.

    I have a MultiView on my masterpage elsewhere, which has 2 views, one for an "error message" or message of any type, actually, and one for page content, which holds nothing more than a ContentPlaceHolder control.

    Okay...

    On my ContentPage, (off the masterpage, now), I have another atlas:UpdatePanel (mode="Conditional") with a drop down listbox (autopostback="true") on it and a label.  All the dropdown listbox does is change the text of the label in the codebehind.  Basically, I have 2 list items, just so the SelectedIndexChanged event will trigger as I switch between them, and the codebehind changes Label1.Text from "Label" to "testing."

    Now, run the page.  All works perfectly fine, as both the label and the dropdownlist are child objects of the UpdatePanel.  If you change the selected item in the DDL, it'll all work great as Label1.Text changes to "testing."
    This is what doesn't work:
    Now, take the identical situation above.  On your content page, Add a new multiview.  Now add a new view.  Now place the UpdatePanel (and in doing so, its children, the dropdownlist and the label) inside the view you just created.  To make sure the view is shown, on the MultiView properties box, change the ActiveViewIndex property from -1 to 0.

    Run the page.  If you change the DDL selected item, the atlas:UpdateProgress fires as if it's doing something, but the label is never updated.
    Has anyone else had a similar problem?  Can someone else confirm this for me, or (I'd very much so rather) explain to me how i'm just being retarded and can't figure this out?
    Jay Baldwin
  • Re: Bug: Content Page MultiViews

    05-04-2006, 3:37 AM
    • Member
      50 point Member
    • ghelobytes
    • Member since 05-04-2006, 7:30 AM
    • Posts 10

    Hi Darc,

    I have almost similar situation with yours except that

    upon changing the DDL, a message box will pop up

    saying "Assertion Faild: Could not find HTML element..."

    Do you think this could be related?

  • Re: Bug: Content Page MultiViews

    05-04-2006, 4:31 AM
    • All-Star
      25,662 point All-Star
    • Luis Abreu
    • Member since 02-12-2005, 6:22 AM
    • Madeira [Portugal]
    • Posts 5,368
    • TrustedFriends-MVPs

    hello.

    hum...idon't know if this is similar to what you've got, but i've built a small test and it's running here:

    masterpager:

    <%

    @ Master Language="C#" %>

    <!

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

    <

    script runat="server">

    </

    script>

    <

    html xmlns="http://www.w3.org/1999/xhtml" >

    <

    head runat="server">

    <title>Untitled Page</title>

    </

    head>

    <

    body>

    <form id="form1" runat="server">

    <div>

    <atlas:ScriptManager runat="server" ID="manager" EnablePartialRendering="true" />

    <asp:MultiView runat="server" id="topView" ActiveViewIndex="0">

    <asp:View runat="server">

    <asp:contentplaceholder id="ContentPlaceHolder1" runat="server">

    </asp:contentplaceholder>

    </asp:View>

    <asp:View runat="server">

    oopsss...error here!

    </asp:View>

    </asp:MultiView>

    <hr />

    <%

    = DateTime.Now.ToString() %>

    </div>

    </form>

    </

    body>

    </

    html>

    page

    <%

    @ Page Language="C#" MasterPageFile="~/MasterPage4.master" Title="Untitled Page" %>

    <

    script runat="server">

    void Handle(object s, EventArgs args)

    {

    info.Text = myDrop.SelectedItem.Text;

    }

    </

    script>

    <

    asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <asp:MultiView runat="server" ID="innerView" ActiveViewIndex="0">

    <asp:View runat="server">

    <atlas:UpdatePanel runat="server" id="panel">

    <ContentTemplate>

    <asp:DropDownList runat="server" ID="myDrop" AutoPostBack="true" OnSelectedIndexChanged="Handle">

    <asp:ListItem Text="Option1" />

    <asp:ListItem Text="Option2" />

    <asp:ListItem Text="Option3" />

    </asp:DropDownList>

    <br />

    <asp:Literal runat="server" ID="info" />

    <br />

    <%

    = DateTime.Now.ToString() %>

    </ContentTemplate>

    </atlas:UpdatePanel>

    </asp:View>

    </asp:MultiView>

    </

    asp:Content>

     

    does it work there?

    --
    Regards,
    Luis Abreu
    email: labreu_at_gmail.com
    EN blog:http://msmvps.com/blogs/luisabreu
  • Re: Bug: Content Page MultiViews

    05-04-2006, 9:37 PM
    • Member
      50 point Member
    • ghelobytes
    • Member since 05-04-2006, 7:30 AM
    • Posts 10

    Hi Luis:

    I tried your code and it works, however, it contains only 1 view. Have you tried your code with several views in it?

    Here is my code:

    <%@ Page Language="C#" %>

    <!

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

    <

    script runat="server">

    protected void Page_Load(object sender, EventArgs e)

    {

    System.Threading.Thread.Sleep(1000);

    }

    protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e)

    {

    MultiView1.ActiveViewIndex = DropDownList2.SelectedIndex;

    }

    </

    script>

    <

    html xmlns="http://www.w3.org/1999/xhtml" >

    <

    head runat="server">

    <title>Untitled Page</title>

    <atlas:ScriptManager ID="sm1" EnablePartialRendering="true" runat="server"></atlas:ScriptManager>

    </head>

    <body>

    <form id="form1" runat="server">

    <asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList2_SelectedIndexChanged" CssClass="comboxxx">

    <asp:ListItem Value="0">Main Form</asp:ListItem>

    <asp:ListItem Value="1">Sub Form</asp:ListItem>

    </asp:DropDownList>

    <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">

    <asp:View ID="View1" runat="server">

    <atlas:UpdatePanel ID="up1" Mode="Conditional" runat="server">

    <ContentTemplate>

    <atlas:UpdateProgress ID="progress1" runat="server">

    <ProgressTemplate>

    Updating....

    </ProgressTemplate>

    </atlas:UpdateProgress>

    <asp:Calendar ID="Calendar1" runat="server"></asp:Calendar>

    </ContentTemplate>

    </atlas:UpdatePanel>

    </asp:View>

    <asp:View ID="View2" runat="server">

    <br />

    <asp:Button ID="Button1" runat="server" Text="Button" />

    </asp:View>

    </asp:MultiView>

    </form>

    </body>

    </html>

    ===========

    Running this page will pop up an Message box saying:

    Assertion Failed: Could not find an HTML element with ID "ctl00_mainContentPlaceHolder_progress1" for control of type "Sys.UI.Control"

    Please give me a feedback if you can confirm this... Smile [:)]

  • Re: Bug: Content Page MultiViews

    05-05-2006, 8:01 AM
    • All-Star
      25,662 point All-Star
    • Luis Abreu
    • Member since 02-12-2005, 6:22 AM
    • Madeira [Portugal]
    • Posts 5,368
    • TrustedFriends-MVPs

    hello.

    well, the problem is that the updateprogress control is allways inserted on the page (even in those cases when the view that contains it isn't visible - i'm talking about the xml-script generation that is causing the problem you're having). as a solution, try putting the updateprogress control on the outside of the multiview control (this should solve the problem).

    --
    Regards,
    Luis Abreu
    email: labreu_at_gmail.com
    EN blog:http://msmvps.com/blogs/luisabreu
  • Re: Bug: Content Page MultiViews

    05-05-2006, 11:02 AM
    • Member
      15 point Member
    • Darc
    • Member since 03-26-2006, 2:11 PM
    • Pataskala, OH USA
    • Posts 3
    I originally started this thread because of the difficulty I'm having with UpdatePanels within the multiview of a child content page.  That's what I'm concerned about.  It doesn't help me to hear about the UpdateProgress control, as I imagine they'll probably make multiples of the controls able to be updated by different update panels (at least I hope).  I just want the UpdatePanel control to be able to be updated from a script manager on a master page when the update panel is a child of a view / multi view on a content page.  :P
    Jay Baldwin
  • Re: Bug: Content Page MultiViews

    05-05-2006, 2:24 PM
    • All-Star
      25,662 point All-Star
    • Luis Abreu
    • Member since 02-12-2005, 6:22 AM
    • Madeira [Portugal]
    • Posts 5,368
    • TrustedFriends-MVPs

    hello again.

    well, the script problem is related with the place where you've put it on the page. if you've put it outside the updatepanel, everything should work without any problems. so, i really don't understand your previous post where you say that it doesn't help you knowing that the problem is with the updateprogress they won't provide something like that(just look at the code that's generated - it's as simple as that!)...

    --
    Regards,
    Luis Abreu
    email: labreu_at_gmail.com
    EN blog:http://msmvps.com/blogs/luisabreu
  • Re: Bug: Content Page MultiViews

    07-25-2006, 11:43 AM
    • Member
      367 point Member
    • andymarks
    • Member since 05-22-2006, 10:32 AM
    • England
    • Posts 83

    I have exactly this problem.  I have a multiview with 2 views, lookup and details.  The details view holds an updatepanel, updateprogress and several other form widgets.

    When the page first loads, the multiview index is set to 0 (lookup mode) and the error occurs.

    If I set the page to load into details mode then the error does not appear.

    This behaviour is wrong.

    Andy.

     

Page 1 of 1 (8 items)