What I’m trying to do is basicly what this photo shows.
When I select something from the treeview it passes a parameter to a linq command that selects some data from the database. For every item in the selection I want to make a Icon and a text that represents if the item is a folder or a file.
When I push the Icon or the Link i want it to do the same as i would push the treeview, pass a parameter to a linq command that selects again from the database and populates the placeholder.
The way I’m doing this now is to make at runtima a Panel that holds the ImageButton and LinkButton. Then i add the Panel to the ContentPlaceHolder.
The problem with this that it does it every time i select something new and also i cant get it to work if the push the icon or the linkbutton, only the from the treeview.
Could i use some controller and css to get this look for the Icons ?
Is there another better way ?
This is basicly the same system as the Explorer uses in Windows, Treeview shows only the folder but the window shows the folders and files. When i click a folder that folder opens up and the main window is populated with items that are inside that folder. If i click a file a editor opens up with the contents of the file.
Sorry had to add as another Answer. Here’s a quick sample of the folder user control.
Create your Control… Format however you want.
Add Properties and Click Event to the Code Behind (don’t forget to fire the click event when your image and link buttons are clicked):
Create your Repeater of the FolderButton Controls:
Set Folder Id on DataBinding:
Lastly you can then do whever you want on the event Click:
Let me know if anything is unclear. This is just a quick freehand sample, so forgive any typos or bad practices… code is just for demostration purposes only.