Dec 15, 2009, 5:41 AM
Redirecting without refreshing(with ajax event) By Menu items
Hi,
I have a master page and menu items in it at the left sight.
I would like to redirect mypage by clicking menu items. Please see the code below.
it is working but with refreshing a page.
<ext:ScriptManager runat="server" />
<Body>
<ext:Accordion ID="AccordionLayout1" runat="server">
<ext:MenuPanel ID="MenuPanel1" runat="server" Title="Modules" Icon="ArrowSwitch">
<Menu>
<Items>
<ext:MenuItem ID="NewModule" runat="server" Text="Add new Module" Icon="ArrowRight" />
<ext:MenuItem ID="ModuleList" runat="server" Text="Module List" Icon="ArrowRight" />
<ext:MenuItem ID="ModulePlacement" runat="server" Text="Change module place" Icon="ArrowRight" />
</Items>
<AjaxEvents>
<ItemClick OnEvent="MenuItemClickAjax" >
<EventMask ShowMask="true" />
<ExtraParams>
<ext:Parameter Name="title" Value="e.text" />
</ExtraParams>
</ItemClick>
</AjaxEvents>
</Menu>
</ext:MenuPanel>
<ext:MenuPanel ID="MenuPanel2" runat="server" Title="Menu panel without selection saving" SaveSelection="false" Icon="ArrowSwitch">
<Menu>
<Items>
<ext:MenuItem ID="MenuItem10" runat="server" Text="Point 1" Icon="ArrowRight" />
<ext:MenuItem ID="MenuItem11" runat="server" Text="Point 2" Icon="ArrowRight" />
<ext:MenuItem ID="MenuItem12" runat="server" Text="Point 3" Icon="ArrowRight" />
<ext:MenuItem ID="MenuItem13" runat="server" Text="Point 4" Icon="ArrowRight" />
<ext:MenuItem ID="MenuItem14" runat="server" Text="Point 5" Icon="ArrowRight" />
<ext:MenuItem ID="MenuItem15" runat="server" Text="Point 6" Icon="ArrowRight" />
<ext:MenuItem ID="MenuItem16" runat="server" Text="Point 7" Icon="ArrowRight" />
<ext:MenuItem ID="MenuItem17" runat="server" Text="Point 8" Icon="ArrowRight" />
<ext:MenuItem ID="MenuItem18" runat="server" Text="Point 9" Icon="ArrowRight" />
</Items>
</Menu>
</ext:MenuPanel>
</ext:Accordion>
</Body>
[AjaxMethod]
protected void MenuItemClickAjax(object sender, AjaxEventArgs e)
{
Ext.Redirect("ModuleList.aspx");
}
is it possible that redirecting a page without refreshing(postback) ?
or can I select the menu item in the redirected page in the menu? (otherwise I cannot fiigure out that in which item I have been working on)
Thank you in advance..