• Advertisement
Sign in to follow this  

[.net] Wrong Event getting triggered???

This topic is 3109 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a page with a treeview in an updatepanel. A tabcontainer. Each tab panel has an UpdatePanel. Each UpdatePanel has an usercontrol in it. Ok. Now my TreeView is an asyncpostback trigger for the updatepanel of one of my updatepanels. When I click a node, the selectedvalue should show in the label of that usercontrol. But for some reason, I have to click it twice, for the value to show properly. If I click once, then the selectedvalue of the previous selected node is shown. When I run it through the debugger, the page load event of my usercontrol comes up first. I thought the selectednodechanged event of my main page should be the first event showing in the debugger. Why is that? What am I not understanding about the life cycle? Or ASP.NET in general?

Share this post


Link to post
Share on other sites
Advertisement
It's somewhat confusing without a picture or something, but...

The events fired by controls happens AFTER the page load. If the you want the value updated after the click create a hidden field or javascript to get the value.

I could have misunderstood your question though.

Nick

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement