Introduction

Microsoft WebMatrix provides an easy way to get started with web development, and together with new Razor syntax for ASP.NET Web Pages it includes everything you need to get your web site up, running and integrated with many other sites and networks, in a short period of time. The WebMatrix helpers are designed to make your life easier when creating web sites. They provide you a simple and consistent way of performing common web development tasks that otherwise would require a great deal of custom coding. With a few lines of code you should be able to secure your web site using membership, store information in Windows Azure Storage, integrate your site with Facebook, among others things.

The Eventbrite Helper for WebMatrix makes it simple to promote your Eventbrite events in your WebMatrix site. With a few lines of code you will be able to display your events on your web site with integration with Windows Live Calendar and Google Calendar. With the helper in place you can also easily sell tickets, or leverage the Eventbrite API for managing your events information.

Getting Started in 60 Seconds

The helper mainly consists of a Eventbrite.dll library, that should be placed in the Bin folder of your WebMatrix site, together with an Eventbrite folder with some styles. To use the helper follow these steps:

  1. If you haven't got an Eventbrite account, sign up for a basic account.
  2. Start by requesting an application key in this page, which enables you to access the Eventbrite API.
  3. Then retrieve your API user key from your account page. The user key is a unique string assigned by Eventbrite which identifies the user making an API call.
  4. Download the helper package and extract its content in the root folder of your WebMatrix site.
  5. Add the following line to the _AppStart.cshtml page of your WebMatrix site (if the file does not already exist, create it in the root of the website), replacing the placeholders with your Eventbrite application key and user key.
    @{
        Eventbrite.Initialize(
                      appKey: "{your-app-key}",
                      userKey: "{your-user-key}");
    }
  6. In any WebMatrix page, add the following line to display your Eventbrite events:
    @Eventbrite.GetUserEventsWidget(count: 10)

Documentation and Samples

Helper reference is available here. Optionally, you can download a sample WebMatrix web site where you can see the helper in action. To download and run it with Microsoft WebMatrix, follow these steps:

  1. Download the sample site from the Downloads section. Extract the contents and open the folder in WebMatrix.
  2. Configure your Eventbrite application key and user key in the _AppStart.cshtml page.
  3. Run the sample! It contains code samples and examples of each feature provided by the helper.

Other Useful Resources

Don't miss the helper's getting started screencast.

You can find more information about the Eventbrite API in http://developer.eventbrite.com/doc/.

Learn more on WebMatrix, ASP.NET Web Pages and the Razor Syntax with the WebMatrix tutorials.

Last edited Dec 29, 2010 at 2:44 PM by jsenior, version 18