For example: I have a PanelBar in an aspx page. CLicking one of the items in PanelBar redirects the user to different aspx page. When the new aspx page loads, I want the panelBar to show up with the selected (highlighted) link, that brought the user here in first place.
5 Answers, 1 is accepted
Here's an example of how you can do this with a little code-behind magic...
And the .cs backend:
Now also make an additional RadPanelNavTest-B.aspx with the same RadPanel setup and the same Page_Load logic in the code-behind. The logic here is...
- RadPanelItem's can be id'd by their .Text property, so...
- Pass their text item as a tgt argument in the url
- Grab that argument (if it exists, that is)
- Find the item in the root RadPanelBar
- Give it a nice backcolor (or you can do css here, your call)
- Last but not least, find the parent RadPanelItem and set it to expanded so you can see the fruits of your labor
Let me know if that works for you. :)
P.S.- I took a break from what I was working on this morning to figure this out as I share your hatred for usercontrols. ;D
I PanelBar I Child1.aspx pages load in this area I
I Child 1 I I
I Child 2 I I
I I I
I I I
I don't know much about RadSplitter yet, I was thinking if you have any RadSplitter code to get started?
I knew I saw this in a demo somewhere, just couldn't find it until this morning... ;)
This gives you the basic layout of the splitter, all you have to do is swap a RadPanelBar into the left pane and have it set the ContentUrl of the right pane. Definitely a better option if you're dealing with that many pages!!