Click here to Skip to main content
12,954,672 members (73,331 online)
Click here to Skip to main content


33 bookmarked
Posted 29 May 2005

Associated Icons Image Control

, 1 Jun 2005
A web control that displays the icon image currently associated with a given file or file extension.
<%@ Page language="c#" Codebehind="TestPage.aspx.cs" AutoEventWireup="false" Inherits="AssociatedIcons.TestPage" %>
<%@ Register Tagprefix="SP" Namespace="AssociatedIcons.Controls" Assembly="AssociatedIcons" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
		<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
		<meta name="CODE_LANGUAGE" Content="C#">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="">
	<body >
		<form id="TestPage" method="post" runat="server">
			<SP:AssociatedIcon id="file1" runat="server" 
				ExtensionOrFile=".doc" largeIcon="True" />
			<SP:AssociatedIcon id="file2" runat="server" 
				ExtensionOrFile="file.bmp" largeIcon="false" />
			<SP:AssociatedIcon id="Associatedicon1" runat="server" 
				ExtensionOrFile="file.jpg" largeIcon="true" />
			<SP:AssociatedIcon id="Associatedicon2" runat="server" 
				ExtensionOrFile="file.gif" largeIcon="false" />
			<SP:AssociatedIcon id="Associatedicon3" runat="server" 
				ExtensionOrFile="file.mp3" largeIcon="true" />
			<asp:Button ID=test Runat=server  Text=test />

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Sergio Pereira
United States United States
Sergio Pereira is a senior software developer and architect. He currently makes his services available throughout Chicago and suburbs. Sergio has always made himself proficient in mainstream Microsoft technologies and has a deep interest in emerging technologies and the software life cycle aspect of development.
Feel free to contact Sergio at sergio_pereira(AT)msn(dot)com.

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170525.1 | Last Updated 2 Jun 2005
Article Copyright 2005 by Sergio Pereira
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid