BlackBerry Development Fundamentals

What people have said about the book:

It's a very easy read, and that's a good thing.  Wargo's background in teaching budding developers around the US shines through in the clear and concise way it tackles each topic. The content is relevant and appropriate for it's target audience and there are many asides that will interest more experienced developers.  Time and time again I found myself saying ah that's how that works (the MDS broken down in it's component parts, BlackBerry security, and how to compile Java apps for multiple devices to name just three).

Jason Hook
www.notesberry.org

Home Inside the Book Sample Code Chapter 8 - Header Dump Application (C#)
Chapter 8 - Header Dump Application (C#) PDF Print E-mail

The code sample shown below is a Microsoft C# version of the Domino Header Dump sample application. The following code is executed in the onLoad event for a .NET web page and will display the contents of the web request's HTTP Headers:

using System;
using System.Collections.Specialized;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class _Default : System.Web.UI.Page 
{
 protected void Page_Load(object sender, EventArgs e)
 {
 NameValueCollection headers = Request.Headers;
 Response.Write("<h1>HTTP Request Headers</h1><hr />");
 foreach (string key in headers)
 {
 Response.Write("<b>" + key + "</b><br />" + headers[key] + "<br /><br />");
 }      
 }
}

 

Attachments:
Download this file (Header Dump.zip)Header Dump.zip5 Kb20/10/09 21:17
 
InformIT (Pearson Education)