O'Reilly logo

Applied ASP.NET 4 in Context by Adam Freeman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building the Event Editor Page

The Add New Event, Edit, and Delete buttons in the Events.aspx page all load the EventEditor.aspx page, providing context using the query string as to what actions are required. We can expect to deal with three types of URLs:

/EventEditor.aspx?mode=add /EventEditor.aspx?mode=edit&id=3 /EventEditor.aspx?mode=delete&id=3

The first is the kind we can expect when the user wants to add a new event, and the others are for when the user wants to edit or delete an event, respectively. For this page, I have started by defining the data source controls, as shown in Listing 21-14.

Listing 21-14. The data source controls in the EventEditor.aspx page

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required