Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
C#
branch: master
Failed to load latest commit information.
Properties Initial commit
.gitignore Initial commit
AdaptiveImageHandler.cs Default configuration values can now be overriden in .config file
AdaptiveImages.csproj
AdaptiveImages.sln Initial commit
Readme.md Added a Readme file
Sample.Web.config Default configuration values can now be overriden in .config file

Readme.md

This is a C# .NET port of the PHP adapative-images script http://adaptive-images.com/.

Installation

The project can be compiled to a DLL and dropped into any .NET 4 project. Alternatively, add this project to an existing solution. The project can also be compiled in .NET 3.5 compatibility if required.

Add the handler references from the sample.web.config to the web.config file for your website.

Add the following javascript to set a cookie with the screen resolution:

<script type="text/javascript">document.cookie = 'resolution=' + Math.max(screen.width, screen.height) + '; path=/';</script>
Something went wrong with that request. Please try again.