问题描述
朋友们,
我有一个菜单项,其中包含导航到每个项目的不同页面的菜单项列表.我使用了Update,但是单击菜单项后页面会刷新.请告知我,是否还有其他解决方案.
问候,
B.Laxman.
Hi frds,
I have a menu item which contains list of menu items navigating to different page for each item. I used Update but the page get refreshing when i click on menu item.Please let me know , is there any alternative solution for it.
Regards,
B.Laxman.
推荐答案
<asp:updatepanel runat="server" xmlns:asp="#unknown">
<contenttemplate>
<asp:placeholder runat="server" id="placeHolder1" />
</contenttemplate>
</asp:updatepanel>
然后,以Web用户控件的形式创建菜单中表示的每个页面,并在单击菜单项时将其插入.
And then create each page represented in the menu as a Web user controls and inject it when the menu item is clicked.
placeHolder1.Controls.Add(new MyWebUserControls());
确保updatepanel更新模式正确,并且菜单触发异步操作,该操作将使用新的Web用户控件更新updatepanel.
问候
约阿希姆(Joachim)
Make sure the updatepanel update mode is correct and the menu triggers an async operation which will update the updatepanel with the new web user control.. :-)
Regards
Joachim
这篇关于Matser页面中的asp菜单的异步回发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!