"); Response.Write(string.Format("
"); }%> Come around 9pm. Fancy dress is optional
Repeat the process to create the sorryyoucantcome.html file and set the contents to match the contents in Listing 1-12. Listing 1-12. The contents of the sorryyoucantcome.html fileIt won't be the same without you. Maybe next year.
Name | Phone | |
---|---|---|
{0} | {1} | {2} | ", rsvp.Name, rsvp.Email, rsvp.Phone); Response.Write(htmlString); } %>
Name | Phone | |
---|---|---|
{0} | {1} | {2} | ", rsvp.Name, rsvp.Email, rsvp.Phone); Response.Write(htmlString); } %>
Name | Phone |
---|
<%= GetMessage() %>
We have added a title for the page and replaced the default form entry with some standard HTML elements, including a p element containing a code nugget that inserts the result of evaluating a method called GetMessage. We have defined the GetMessage method in the Default.aspx.cs code-behind file, which you can see in Listing 3-2.Name | Height (m) |
---|---|
Everest | 8848 |
Aconcagua | 6962 |
McKinley | 6194 |
Kilimanjaro | 5895 |
K2 | 8611 |
Name | Height (m) |
---|---|
Everest | 8848 |
Aconcagua | 6962 |
McKinley | 6194 |
Kilimanjaro | 5895 |
K2 | 8611 |
Name | Height (m) |
---|
Quantity | Item | Price | Subtotal |
---|---|---|---|
<%# Item.Quantity %> | <%# Item.Product.Name %> | <%# Item.Product.Price.ToString("c")%> | <%# ((Item.Quantity * Item.Product.Price).ToString("c"))%> |
Total: | <%= CartTotal.ToString("c") %> |
Quantity | Item | Price | Subtotal | |
---|---|---|---|---|
<%# Item.Quantity %> | <%# Item.Product.Name %> | <%# Item.Product.Price.ToString("c")%> | <%# ((Item.Quantity * Item.Product.Price).ToString("c"))%> | |
Total: | <%= CartTotal.ToString("c") %> |
">Continue shopping ">Checkout
... We haven’t listed the complete contents of the CartView.aspx file because the change is so minor—we have added an a element whose href attribute is set to the value of a new code-behind property called CheckoutUrl. In Listing 8-16, you can see how we have defined the CheckoutUrl property in the CartView.apsx.cs code-behind file. Listing 8-16. Defining the CheckoutUrl property in the CartView.aspx.cs code-behind file using using using using using using using
Name | City | Items | Total | |
---|---|---|---|---|
<%#: Item.Name %> | <%#: Item.City %> | <%# Item.OrderLines.Sum(ol => ol.Quantity) %> | <%# Total(Item.OrderLines).ToString("C") %> | |
Name | Description | Category | Price |
---|---|---|---|
Come around 9pm. Fancy dress is optional
In Listing 11-4, you can see the contents of the /Content/sorryyoucantcome.html file. Listing 11-4. The /Content/sorryyoucantcome.html fileIt won't be the same without you. Maybe next year.
These files have the same name and the same content as the ones that we used in Chapter 1, but they are in the Content folder, which we will need to refer to when we need to use them.Name | Phone |
---|
Name | Phone |
---|
\r\n