problems with TreeView ViewState in ASP.NET 2.0

G

Guest

Hi Everybody,

I've got a strange problem with TreeView Control in ASP.NET.

The Controls Tree I've got on my page is like this:

MasterPage
Content[
UserControl[
Menu,
MultiView[
View1[
TreeView
]
View2[
...
]
]
]

The Menu control has two items that switch between the two Views in the
MultiView (I'm setting MultiView.ActiveViewIndex in the MenuItemClick event
handler).

Now, The problem happens when I select a node in the tree, click on the menu
item to move to View2, and the I click on the menu item to come back to View2.

In the MenuItemEvent handler, TreeView1.SelectedItem is null!

But, when the page is displayed the node that was selected before I moved to
the other view is displayed as selected!

I looks as if the ViewState of the Tree is restored AFTER the MenuItemClick
handler is called!

Has anybody ran across this problem before?

Nadav
 
W

Walter Wang [MSFT]

Hi Nadav,

I've tried to create a simple test web site using the steps you described,
however I didn't see the issue on my side. Would you please send me a
reproducible project? Thanks.

By the way, normally if you could provide some more complete code while
asking the question, it might help you get the answers more quickly.

Sincerely,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
W

Walter Wang [MSFT]

Hi Nadav,

Thank you for your sample project. I was able to reproduce the issue using
your code. Currently I'm doing more research and will get back to you as
soon as I got more information. Thank you for your patience and
understanding.

Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top