Matser页面中的asp菜单的异步回发 [英] Asynchronous post back for a asp Menu in Matser page

查看:68
本文介绍了Matser页面中的asp菜单的异步回发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友们,

我有一个菜单项,其中包含导航到每个项目的不同页面的菜单项列表.我使用了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.

推荐答案



除了使用母版页,您还可以创建一个默认页,然后放置一个更新面板和一个占位符.

像这样:
Hi,

Instead of using master pages, maybe you can create one default page and then place an updatepanel and a placeholder.

Like this:
<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菜单的异步回发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆