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" ...
Get Applied ASP.NET 4 in Context now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.