Question: I am providing a PDF file to the user in an ASP.NET application. I have included the code I am using the do this. This works great if that's the only thing I'm doing on that request. What I would really like to do is show provide this PDF file on Form Load without affecting any of the other stuff in the Form Load event. Can somebody point out what I'm doing wrong in the code? Thanks!!

```
Response.Clear();
Response.Buffer = true;
Response.ContentType = file.ContentType;
Response.AddHeader("content-disposition", String.Format("attachment; filename=\"{0}\"", file.OriginalFileName));
Response.TransmitFile(Path.Combine("C:\", file.FileName));
Response.End();

```

Answer: 
Assuming the array is something like:

```
NSArray * array = [NSArray arrayWithObjects:
    [NSDictionary dictionaryWithObjectsAndKeys:
        [NSNumber numberWithInt:3], @"NameID", @"test1", @"Name", nil],
    [NSDictionary dictionaryWithObjectsAndKeys:
        [NSNumber numberWithInt:6], @"NameID", @"test2", @"Name", nil],
    nil];

```

You can iterate it like this:

```
NSEnumerator *enumerator = [array objectEnumerator];
id obj;
while ((obj = [enumerator nextObject]))
{
    NSLog(@"NameID:[%@]; Name:[%@]",
        [obj objectForKey:@"NameID"],
        [obj objectForKey:@"Name"]);
}

```

Output:

```
2010-02-04 11:41:53.266 x[8739] NameID:[3]; Name:[test1]
2010-02-04 11:41:53.267 x[8739] NameID:[6]; Name:[test2]

```
It's an array of NSDictionary so just iterate through the array and cast to NSDictionary then ask for the key to get the value.