Software to help you build a better store
SEARCH
May 7, 2006

Anthem Tip#1: Use BaseUri

If you are using Anthem with an ASP.NET 1.1 application, then you have probably noticed that the Anthem javascript is added to every page. This adds about 20K to every response. Anthem will use an external source file instead if you define the Anthem.BaseUri appSetting. For example,

<?xml version="1.0" encoding="utf-8" ?>

<configuration>

  <appSettings>

    <add key="Anthem.BaseUri" value="http://localhost/Anthem-Examples-2003/" />

  </appSettings>

</configuration>

This will cause Anthem to generate this external <script> tag instead of including the javascript in the page.

<script type='text/javascript' src='http://localhost/Anthem-Examples-2003/Anthem.js'></script>

You can also use the tilde character (~) to reference the application root. For example,

<?xml version="1.0" encoding="utf-8" ?>

<configuration>

  <appSettings>

    <add key="Anthem.BaseUri" value="~/" />

  </appSettings>

</configuration>

Note that you should add a copy of Anthem.js to your web site so that your browser can find it. If you are using Anthem in an ASP.NET 2.0 application, it will do something similar automatically. You do not need to include the Anthem.BaseUri appSetting.

This site looks much better in a browser that supports current web standards, but it is accessible to any browser. Download one now This link is to a third party web site which will open in a new window

Some parts of this site will not work effectively on this older browser.
Please consider updating your browser This link is to a third party web site which will open in a new window

SSL