View Single Post
 
Old July 19th, 2004, 11:50 AM
commerceJeff commerceJeff is offline
Registered User
 
Join Date: Jul 2004
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Perfect, just what I needed.

It is a user dir on the server. I'm populating the control in the DDL's OnLoad with this code (C#):

Quote:
quote:try
{
    DirectoryInfo logoDir = new DirectoryInfo(logoRoot + userDir);
    LogoSelector.Items.Clear();
    LogoSelector.Items.Add(" ");

    foreach ( FileSystemInfo fsInfo in logoDir.GetFileSystemInfos() )
    {
        try
        {
            if ( !((File.GetAttributes(fsInfo.FullName) & FileAttributes.Directory) == FileAttributes.Directory) )
            {
                // It must be a file
                FileInfo fiLogo = (FileInfo)fsInfo;
                LogoSelector.Items.Add(fiLogo.Name.ToString());
            }
        }
        catch
        {
            // Skip this one and try the next...
        }
    }
    foreach ( ListItem li in LogoSelector.Items )
        li.Selected = li.Value.ToString() == graphic1.Text ? true : false;
    . . .
The method only fires once on page load and once when the popup is closed, so it should be fine. Thanks for the help!

Jeff