Adding and Using Controls - shellscape/Brew GitHub Wiki

Once you've gone through Downloading and Installing Brew and Getting Started with Brew, you're ready to start using Brew's controls and extenders.

What's a control?

For the uninitiated, a control is an entity that renders html to the page. These are stand-alone and don't alter or depend upon other server controls on the page.

What's an extender?

Extenders are controls which alter or depend upon other server controls on the page. You specify which server control they target by using the for="" attribute. (Extenders in the core of ASP.NET use an attribute of TargetControlID in usual Microsoft verbose fashion. Brew doesn't contain traditional extenders and prefers the more succinct targeting attribute.)

If you haven't checked out the demonstration website yet, I highly recommend you take a few and look through it. It contains Brew code examples for most of the examples on the jQuery UI website.

Here's a sample ASPX page, using a master page and content placeholder, that renders a Brew datepicker:

<%@ page title="" language="C#" masterpagefile="~/master.master" autoeventwireup="true" codefile="datepicker.aspx.cs" inherits="datepicker" %>

<asp:content id="content" contentplaceholderid="content" runat="Server">

  <h2 class="control">datepicker</h2>

  <p>Default: <input type="text" id="default" runat="server" /></p>

  <brew:datepicker runat="server" for="default"  />

</asp:content>

If you'd like to hook up to any Brew control events, you'd go about it the same as any other control in the codebehind/codefile.

⚠️ **GitHub.com Fallback** ⚠️