ASP.NET 3.5 and above only

Obout.Ajax.UI Controls - HTML Editor - Server side

Obout.Ajax.UI.HTMLEditor.Popups.Preview class

<%@ Register Assembly="Obout.Ajax.UI" Namespace="Obout.Ajax.UI.HTMLEditor.Popups" TagPrefix="obout" %>

This class describes the type used to preview a file by its extension.
See the Previews property of the FileBrowser.

Properties

Name Description
propertyExtensions String. Gets or sets files extensions separated by semicolon. These extensions are used for files filtering.
Value "*" means 'FOR ALL FILES WITH ANY EXTENSION NOT FILTERED YET'.
Default String.Empty (for files without extension).
propertyTypeName String. Gets or sets assembly-qualified name of the preview class. Class of this type should implement IPreview interface.
Default String.Empty .
Example:

<%@ Register Assembly="Obout.Ajax.UI" TagPrefix="obout" Namespace="Obout.Ajax.UI.HTMLEditor" %>
<%
@ Register Assembly="Obout.Ajax.UI" TagPrefix="obout" Namespace="Obout.Ajax.UI.HTMLEditor.Popups" %>
...
<obout:PopupHolder runat="server" ID="popupHolder"
  <Demand 
       <%-- Use FileBrowser popup instead of the default browser (UrlBrowser), default target - new window/tab --%>
       <obout:LinkProperties runat="server" BrowserType="Obout.Ajax.UI.HTMLEditor.Popups.FileBrowser"
 
                                       DefaultTarget="New" />
       <%-- Use the obout TreeView control in 'FileBrowser' popup --%>
       <obout:FileBrowser runat="server" UseOboutTree="true" ShowPreviewPanel="true">
          <%-- Set different previewers for different files extensions --%>
          <Previews>
                <%-- All Images here --%>
                <obout:Preview Extensions="jpg;jpeg;gif;bmp;png"
                                       
TypeName="Obout.Ajax.UI.HTMLEditor.Popups.ImageBrowser" />
 
               <%-- Flash Video --%>
                <obout:Preview Extensions="flv" TypeName="Obout.Ajax.UI.HTMLEditor.Popups.FlashVideoBrowser" />
                 <%-- Flash files --%>
                 <obout:Preview Extensions="swf" TypeName="Obout.Ajax.UI.HTMLEditor.Popups.FlashBrowser" />
                 <%-- Media --%>
                 <obout:Preview Extensions="mpeg;avi" TypeName="Obout.Ajax.UI.HTMLEditor.Popups.MediaBrowser" />
 
                <%-- All other files - just show description of the file (if exists) --%>
                 <obout:Preview Extensions="*" TypeName="Obout.Ajax.UI.HTMLEditor.Popups.UrlBrowser" />
 
         </Previews>
          <%-- Set the Tree features --%>
          <TreeFeatures FolderImageUrl="~/treeview/icons/folder_old.gif" > <%-- folders --%>
                 <%-- Set different leaf images for different files extensions --%>
                 <LeafImages>
 
                     <obout:LeafImage Extensions="html" Url="~/treeview/icons/ie_link.gif" />
 
                     <obout:LeafImage Extensions="doc;docx" Url="~/treeview/icons/doc.gif" />
 
                     <obout:LeafImage Extensions="txt" Url="~/treeview/img/vista_note.png" />
 
                     <obout:LeafImage Extensions="jpg;jpeg;gif;bmp;png" Url="~/treeview/img/picture.png" />
 
                     <obout:LeafImage Extensions="mp4;avi;mpeg;flv" Url="~/treeview/img/video.png" />
 
                     <obout:LeafImage Extensions="mp3;wav" Url="~/treeview/img/music.png" />
 
                     <obout:LeafImage Extensions="*" Url="~/treeview/icons/square_yellowS.gif" />
 
                </LeafImages>
 
         </TreeFeatures>
 
     </obout:FileBrowser>
  </
Demand>
</
obout:PopupHolder>

"First, I would like to say great controls. They are awesome."

Blaine Trimmell

Random testimonial   All testimonials