Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 943659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:28:11+00:00 2026-05-15T22:28:11+00:00

What I’m trying to do is basicly what this photo shows. When I select

  • 0

What I’m trying to do is basicly what this photo shows.
alt text

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T22:28:11+00:00Added an answer on May 15, 2026 at 10:28 pm

    Sorry had to add as another Answer. Here’s a quick sample of the folder user control.

    Create your Control… Format however you want.

    <%@ Control Language="C#" AutoEventWireup="true" CodeFile="FolderButton.ascx.cs" Inherits="FolderButton" %>
    <div>
        <asp:ImageButton ID="btnImage" runat="server" ImageUrl="yourfolder.jpg" />
        <asp:LinkButton ID="btnTitle" runat="server" />
    </div>
    

    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):

    public partial class FolderButton : System.Web.UI.UserControl
    {
        public int DatabaseId { get; set; }
        public string Name { get; set;}  // you can even set your linkbutton text here. 
    
        public event EventHandler Click;
    }
    

    Create your Repeater of the FolderButton Controls:

     <asp:Repeater ID="rptFolders" runat="server" OnItemDataBound="rptFolders_ItemDataBound">
                <ItemTemplate>
                    <uc1:FolderButton ID="FolderButton1" runat="server" />
                </ItemTemplate>
            </asp:Repeater>
    

    Set Folder Id on DataBinding:

    protected void rptFolders_ItemDataBound(object sender, RepeaterItemEventArgs e)        
    {        
        if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)        
        {        
            Book book = (Book)e.Item.DataItem; //Or whatever your passing        
    
            FolderButton btnFolder = e.Item.FindControls("FolderButton1");
    
            btnFolder.Name=book.Name;
            btnFolder.DatabaseId=book.Id;
    
            btnFolder.Click += new EventHandler(FolderClicked);        
        }        
    }     
    

    Lastly you can then do whever you want on the event Click:

         void FolderClicked(object sender, EventArgs e)
    {
         int id = ((FolderButton)sender).DatabaseId;
    
         /// Do something with your Id
    }
    

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Does anyone know how can I replace this 2 symbol below from the string
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
this is what i have right now Drawing an RSS feed into the php,
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.