asp.net菜单首先是gens div,然后是回发gens表 [英] asp.net menu gens div's first, then on postback gens table

查看:66
本文介绍了asp.net菜单首先是gens div,然后是回发gens表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我将asp.net应用程序迁移到4.0之后,我注意到菜单项在回发后开始传播".进一步研究之后,我可以使用源代码中的div标签确定菜单的页面加载方式.但是,如果我进行回发,它将开始以表格而不是div的形式生成菜单.

我正在动态构建菜单,但是我确实设置了RenderingMode = MenuRenderingMode.List.

对于我的一生,我无法弄清楚为什么它在回发时忽略了这一点.

有什么想法吗?

After I migrated my asp.net application to 4.0 I noticed the menu item started "spreading out" after a postback. Upon digging in a little farther, I was able to determine the page load gens the menu using div tags in the source; however, if I do a postback, it starts generating the menu as tables instead of div''s.

I am dynamically building the menu, but I do set the RenderingMode = MenuRenderingMode.List.

For the life of me, I cannot figure out why it is ignoring this on the postback.

Any ideas?

推荐答案

您是否尝试过在prerender事件处理程序中再次设置它,或者在那个阶段检查值是什么?可能设置该代码的代码可能不会在回发时被调用吗?
Have you tried setting it again in your prerender event handler, or checking what the value is at that stage ? Might the code that sets it not be getting called on postback ?


这篇关于asp.net菜单首先是gens div,然后是回发gens表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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