Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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?
Posted
Comments
Chris Maunder 11-Aug-11 21:43pm    
Add the smallest snippet of code you can to your question and we might be able to help. Please edit the original question: don't post the info as an answer or comment.

1 solution

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 ?
 
Share this answer
 
Comments
Chris Maunder 11-Aug-11 21:42pm    
From Steve: Still makes me say hmmm.... All of the other menu properties carry across the postback. Turns out on a postback, I was not resetting the properties for anything. All stayed except for RenderingMode. Moved RenderingMode before the bail on the postback, solved annoying problem

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900