Getting Started

Adding the WebFu library to your project

Why? Most of WebFu's functionality requires that this library is added to your project. This is the core of WebFu.

How? Add the compiled WebFormsUtilities.dll file to your .net project by right-clicking on it and selecting "Add Reference..." and then select "Browse".
Make sure that when you publish your project, the WebFormsUtilities.dll is published in the bin folder (which should happen by default).

Adding WebFu to the Web.Config

Why? This allows you to use <WebFu: ...> server controls without adding the reference to each individual page. It also allows you to use WebFu's ScriptHandler so that less JSON/JavaScript is output directly to the page and cached instead on the client's browser.

To enable adding server controls without having to add the reference...
In your web.config file, under <system.web><pages><controls>... add this tag:
<add tagPrefix="WebFu" namespace="WebFormsUtilities.WebControls" assembly="WebFormsUtilities"/>

To enable the ScriptHandler, you must first add a tag under <appSettings> in your web.config:
<add key="WFUseHandler" value="true"/>

..and another tag under <httpHandlers>...
<add verb="GET,HEAD" path="WFUtilities.axd" type="WebFormsUtilities.Handlers.ScriptResourceHandler, WebFormsUtilities" /> well as under <system.webServer><handlers>, add this tag...
<add name="WFUtilities" preCondition="integratedMode" verb="GET,HEAD" path="WFUtilities.axd" type="WebFormsUtilities.Handlers.ScriptResourceHandler, WebFormsUtilities" />

Adding WebFu JavaScript files

Why and How? WebFu depends on several JavaScript files. The WebFu examples include all of these script files, but you can also obtain them below...
  • jQuery 1.4.2+ for AJAX calls
Get jQuery here:
  • JSON2.js for serializing JSON objects in older browsers (IE7, Firefox 3, Safari 3.2)
Get JSON2 here
  • jQuery.validate plugin for client-side validation
Get jQuery Validate here:
  • The WebFu WFUtilitiesJquery.js script for webfu/$wf functions
Get WFUtilitiesJquery.js from the WebFormsUtilities project or directly from source control:

Optionally, you can include the WebFu script WFHtmlTag.js for the client-side webfu.HtmlTag functionality (see here HtmlTag).

Last edited May 24, 2012 at 12:18 AM by aikeru, version 3


No comments yet.