Welcome Guest Search | Active Topics | Sign In | Register

Menu and partial-page updates Options
kyle
Posted: Monday, April 20, 2009 3:15:51 PM
Rank: Newbie
Groups: Member

Joined: 4/20/2009
Posts: 3
I have and ASP.NET page using an update panel for partial page updates. It works find and only that panel gets updated when a dropdown changes. When I add the menu I created with your product, the entire page get refreshed.

Is there a update panel inside the menu that needs to be set 'UpdateMode="Conditional"'? Or some other html element that is preventing partial page updates?

Thanks.
eo_support
Posted: Monday, April 20, 2009 3:20:58 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

You can use the menu either for navigation or triggering server event. If you use the menu for navigation, then when you click a menu item it goes to another page. In this case the entire page will always be reloaded because you are going to a separate page.

If you use the menu for server event, you will need to set the menu's RaisesServerEvent to true. In order for it to work with UpdatePanel, you will need to either place the Menu inside the UpdatePanel, or explicitly set the Menu as an UpdatePanel trigger. Otherwise the UpdatePanel will ignore server event caused by the menu and the whole page will be reloaded.

Hope this helps.

Thanks
kyle
Posted: Monday, April 20, 2009 3:27:16 PM
Rank: Newbie
Groups: Member

Joined: 4/20/2009
Posts: 3
Thanks for the quick response! The menu is for navigation only. The problem occurs by the just having the menu on the page, not even using it. If I keep the menu in the master page the entire refreshes. If I simply remove it I get the partial update working fine. I know in order for partial page updates to work ALL update panels must be set to updatemode=conditional. Is there something inside the menu I can't see that might need to be changed?

Thanks again.
eo_support
Posted: Monday, April 20, 2009 3:40:47 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

We are not aware of any problems like this. We tested the following code and it worked fine here:

Code: HTML/ASPX
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="True">
</asp:ScriptManager>
<eo:Menu runat="server" ID="Menu1" ControlSkinID="MSDN" Width="360px">
    <TopGroup>
        <Items>
            <eo:MenuItem Text-Html="Menu Item1">
            </eo:MenuItem>
        </Items>
    </TopGroup>
</eo:Menu>
<asp:UpdatePanel runat="server" ID="UpdatePanel1" UpdateMode="Conditional">
    <ContentTemplate>
        <asp:Label runat="server" ID="Label1">
        </asp:Label>
    </ContentTemplate>
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="Button1" />
    </Triggers>
</asp:UpdatePanel>
<asp:Button runat="server" ID="Button1" OnClick="Button1_Click" Text="Test" />


Code: C#
protected void Button1_Click(object sender, EventArgs e)
{
    Label1.Text = DateTime.Now.ToString();
    UpdatePanel1.Update();
}


Conditional update should only affect whether the region is updated or not, it should not change a partial page update to a full page update. So I am not sure whether the problem you are seeing has anything to do with Conditional update at all.

In any case, you can compare your code with ours. If the problem continues, please create a test page that demonstrates the problem and we will be happy to take a look. Please make sure the page runs independently. We won't be able to look into page that does not run.

Thanks!


kyle
Posted: Monday, April 20, 2009 4:06:39 PM
Rank: Newbie
Groups: Member

Joined: 4/20/2009
Posts: 3
Thanks again for the quick response. I have something close to that. I made a short test page version. Remember, the page refreshes from a trigger wired to a dropdown. Without the menu in the master page it does a partial update, with the menu it does a full page refresh.

I added this to the page load to test the difference in which part of the page reloads:
Me.Label1.Text = Date.Now.ToString()
Me.Label2.Text = Date.Now.ToString()

Here's the ASP Page:
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">

<ContentTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" Text="click me" Visible="true"></asp:LinkButton>
<asp:Panel ID="Panel1" runat="server" CssClass="detail">
<cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server"
PopupControlID="Panel1"
TargetControlID="LinkButton1"
BackgroundCssClass="modalBackground">
</cc1:ModalPopupExtender>
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="true">
<asp:ListItem>test</asp:ListItem>
<asp:ListItem>trans</asp:ListItem>
<asp:ListItem>test2</asp:ListItem>
</asp:DropDownList>
<br />
<asp:Label ID="Label2" runat="server" Visible="true"></asp:Label>
<cc1:ModalPopupExtender ID="Panel1_ModalPopupExtender" runat="server"
DynamicServicePath="" Enabled="True" TargetControlID="LinkButton1" PopupControlID="Panel1">
</cc1:ModalPopupExtender>
</asp:Panel>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="DropDownList1"
EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
</asp:Content>


When I added the following the master is when the full page refresh happens:

<eo:Menu ID="Menu2" runat="server" ControlSkinID="None" Width="1024px" HideRoleDisabledItems="True">
<LookItems>
<eo:MenuItem ItemID="_TopLevelItem" HoverStyle-CssText="border-bottom-color:#255068;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#255068;border-left-style:solid;border-left-width:1px;border-right-color:#255068;border-right-style:solid;border-right-width:1px;border-top-color:#255068;border-top-style:solid;border-top-width:1px;padding-bottom:3px;padding-left:4px;padding-right:4px;padding-top:3px;" NormalStyle-CssText="padding-bottom:4px;padding-left:5px;padding-right:5px;padding-top:4px;" Image-Mode="ItemBackground" Image-HoverUrl="00000210" Image-Url="Blank">
<SubMenu ItemSpacing="2" Style-CssText="background-color:#f1f1f1;border-bottom-color:#979797;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#979797;border-left-style:solid;border-left-width:1px;border-right-color:#979797;border-right-style:solid;border-right-width:1px;border-top-color:#979797;border-top-style:solid;border-top-width:1px;cursor:hand;font-family:Verdana;font-size:8pt;padding-bottom:2px;padding-left:2px;padding-right:2px;padding-top:2px;" ExpandEffect-Type="GlideTopToBottom" LeftIconCellWidth="0" CollapseEffect-Type="GlideTopToBottom" SideImage="OfficeXPSideBar"></SubMenu>
</eo:MenuItem>
<eo:MenuItem ItemID="_Separator" IsSeparator="True" NormalStyle-CssText="margin-left: 28px; width: 1px; height: 1px; background-color: #e0e0e0;"></eo:MenuItem>
<eo:MenuItem Height="24" ItemID="_Default" HoverStyle-CssText="border-right: #a8d8eb 1px solid; padding-right: 4px; border-top: #a8d8eb 1px solid; padding-left: 1px; padding-bottom: 1px; border-left: #a8d8eb 1px solid; padding-top: 1px; border-bottom: #a8d8eb 1px solid" NormalStyle-CssText="padding-right: 5px; padding-left: 2px; padding-bottom: 2px; padding-top: 2px;" Image-Mode="ItemBackground" Image-HoverUrl="00000204" Image-Url="Blank">
<SubMenu ItemSpacing="2" Style-CssText="background-color:#f1f1f1;border-bottom-color:#979797;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#979797;border-left-style:solid;border-left-width:1px;border-right-color:#979797;border-right-style:solid;border-right-width:1px;border-top-color:#979797;border-top-style:solid;border-top-width:1px;cursor:hand;font-family:Verdana;font-size:8pt;padding-bottom:2px;padding-left:2px;padding-right:2px;padding-top:2px;" SideImage="00000209"></SubMenu>
</eo:MenuItem>
</LookItems>
<TopGroup Style-CssText="background-image:url(00000200);color:white;font-family:Verdana;font-size:12px;padding-bottom:5px;padding-left:5px;padding-right:5px;padding-top:5px;" ItemSpacing="6">
<Items>
<eo:MenuItem HoverStyle-CssText="font-size:Larger;" Text-Html="DARTS Accounting Home" Width="150" NormalStyle-CssText="font-size:Larger;" NavigateUrl="~/Default.aspx"></eo:MenuItem>
<eo:MenuItem HoverStyle-CssText="font-size:Larger;" AllowRoles="Finance, FinanceAdmin, Admin" Text-Html="Search" LeftIcon-Url="~/images/Search.gif" NormalStyle-CssText="font-size:Larger;" NavigateUrl="">
<SubMenu>
<Items>
<eo:MenuItem Height="20" HoverStyle-CssText="font-size:Larger;" Text-Html="Recovered Cases by Date Range" NormalStyle-CssText="font-size:Larger;" NavigateUrl="~/Search.aspx?search=range"></eo:MenuItem>
<eo:MenuItem Height="20" HoverStyle-CssText="font-size:Larger;" Text-Html="Recovered-Individual Case" NormalStyle-CssText="font-size:Larger;" NavigateUrl="~/search.aspx?search=indiv"></eo:MenuItem>
<eo:MenuItem Height="20" HoverStyle-CssText="font-size:Larger;" Text-Html="Special Case-I,R,X" NormalStyle-CssText="font-size:Larger;" NavigateUrl="~/search.aspx?search=spec"></eo:MenuItem>
</Items>
</SubMenu>
</eo:MenuItem>
<eo:MenuItem HoverStyle-CssText="font-size:Larger;" AllowRoles="Finance, FinanceAdmin, Admin" Text-Html="Billing" LeftIcon-Url="~/images/Money.gif" NormalStyle-CssText="font-size:Larger;" NavigateUrl="~/Billing.aspx"></eo:MenuItem>
<eo:MenuItem HoverStyle-CssText="font-size:Larger;" AllowRoles="FinanceAdmin,Admin" Text-Html="Admin" LeftIcon-Url="~/images/User 3 16 h g.gif" NormalStyle-CssText="font-size:Larger;" NavigateUrl="~/Admin/Default.aspx">
<SubMenu>
<Items>
<eo:MenuItem Height="20" HoverStyle-CssText="font-size:Larger;" Text-Html="Manage Billing Code" NormalStyle-CssText="font-size:Larger;" NavigateUrl="~/Admin/ManageBillingCode.aspx"></eo:MenuItem>
<eo:MenuItem Height="20" HoverStyle-CssText="font-size:Larger;" Text-Html="Create Billing Code" NormalStyle-CssText="font-size:Larger;" NavigateUrl="~/Admin/NewBillingCode.aspx"></eo:MenuItem>
<eo:MenuItem Height="20" HoverStyle-CssText="font-size:Larger;" Text-Html="Manage Transactions" NormalStyle-CssText="font-size:Larger;" NavigateUrl="~/Admin/ManageTransLog.aspx"></eo:MenuItem>
<eo:MenuItem Height="20" HoverStyle-CssText="font-size:Larger;" Text-Html="Invoice Print" NormalStyle-CssText="font-size:Larger;" NavigateUrl="~/Admin/LaunchInvoice.aspx"></eo:MenuItem>
</Items>
</SubMenu>
</eo:MenuItem>
</Items>
</TopGroup>
</eo:Menu>


Thanks again!!


eo_support
Posted: Monday, April 20, 2009 4:27:16 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

We tested your code and it works fine here. Our steps are:

1. Run the page, then click "click me". Both Label1 and Label2 show the same time. This is normal because both Labels were rendered when the page initially rendered. Clicking "Click me" merely shows Label2. It does not change Label2;

2. Select a different item from the drop. This triggers the modal extender and hides both the drop down and Label2. At the same time, Label2 has been updated through AJAX. However since it is still not visible, you won't see it;

3. Click "click me" again. Label2 is visible now. Note Label1 and Label2 has different values.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.