Be the first to write a review
Creating a File Management System with File Genie - part 2
Enhance the options of the simple File Management System
In this article Patrick will show you how to enhance the options of the simple File Management System that was created in the article Creating a File Management System with File Genie – part 1. First he will show you how to give the File Management System the Explorer-style, that could be seen in the first article. Next he will hide the Quick-Add form, when no folder has been selected. After that the header will be edited, in such a way that the name of the selected folder will appear in the header of the File List.
To end this article Patrick will walk you through a couple of steps to enable sorting of all columns.
Show folder name in header
When using the File Management System as it is now, the File List has no reference at all as to the content of which folder is shown. In this chapter we will see to it that the foldername is shown in the header of the File List. The foldername will only be shown if a folder was selected.
First we will create a binding for the URL parameter called f. This is not necessary, but this binding will prevent having to enter the code manually each time.
- Make sure the Binding s window is visible in Dreamweaver.
- If it is not, select Window, Bindings from the menu.
- Click the +-button and choose Request Variable to add a new binding.
- Select Request.Querystring from the Type field.
- In the Name field, typ f.
- Click OK.
- The binding for the URL parameter f has now been added to the Bindings window.
Now the binding has been created, the foldername can be added to the File List header.
- Make sure you are looking at the page in Design View.
- Put the cursor behind the text File List in the header.
- Create some space behind the text. In this example we also use the | character.
- Drag the binding Querystring.f from the Bindings window to the header. You could also put the cursor where to insert the binding, and then from the Bindings window select the binding Querystring.f and click the Insert-button.
- Switch to Code View.
- Place the cursor right after the text File List.
- Choose Insert, ASP Objects, If from the menu. The code <% If Then %> is added.
- Drag the binding Querystring.f between If and Then and typ <>"" after it. The code now looks like this.
<% If Request.QueryString("f")<>"" Then %>
- Place your cursor behind the code <%= Request.QueryString("f") %>.
- Choose Insert, ASP Objects, End from the menu. The code <% End If %>is added.
Save and upload the page. When the page is now opened without a folder selected, there will be no foldername in the header of the File List. As soon as a folder is clicked in the Folder List, the foldername will be shown.
Patrick Julicher
Patrick started developing websites at the age of 25, only using HTML and building simple websites. Through the years his passion for designing and developing grew, and his career moved in that direction in the year 2004, when he decided to try and get a job in ICT and Web Development.
He got this chance at WE ICT, based in Nijmegen, The Netherlands. For the first couple of years he combined network management for customers with creating database-driven websites in ASP. Since 2008 his main work is on the developing part.
While ASP is still his favorite language, he's slowly trying to dive into ASP.NET and discover all of the possibilities.