Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Azure

Managing BLOBs using the StorageClient library (part 1) - Listing BLOBs using the storage client

3/4/2011 11:53:20 AM
- How To Install Windows Server 2012 On VirtualBox
- How To Bypass Torrent Connection Blocking By Your ISP
- How To Install Actual Facebook App On Kindle Fire
Now that you’ve finished your break and you’re rested enough to read this, let’s look at how you can use the StorageClient library to list BLOBs in a container, rather than using the REST API directly.

You developed a sample management application that would allow you to upload podcasts in an MP3 format that were ready to be converted to WMA. You made an ASP.NET page that displayed a grid of all the containers in your storage account. Included in the grid was a hyperlink that would redirect you to another page called blobs.aspx, passing in the name of the selected container in the query string. We’re going to extend that example now to develop the page blobs.aspx, shown in figure 1.

Figure 1. An ASP.NET web page that displays all the BLOBs that are in the selected container in a grid control


You can perform the following actions with the page shown in figure 9.4:

  • List all BLOBs in the selected container

  • Upload a new file

  • Delete an existing BLOB

  • Download an existing BLOB

Let’s look at each of these actions in detail.

1. Listing BLOBs using the storage client

In this section, we’ll look at how to generate the grid that displays the list of BLOBs. The following listing contains the markup required for the blobs.aspx page shown in figure 3 of this artilce.

Listing 1. ASPX page that lists the BLOBs in a container

At a GridView is displayed that lists all the BLOBs in its data source. At you’re defining a hyperlink button that you’ll use to download the BLOB, and at FileUpload control to upload the file. is the standard ASP.NET

The Code-Behind For the Web Page

You’ve defined how your web page will look. Now you need to bind the grid to the data source on page load. Listing 2 shows the code-behind required to display a list of BLOBs for the selected container in your grid.

Listing 2. Show the list of BLOBs in the grid


At you retrieve an instance of the BLOB container by calling the GetContainerReference method off the BLOB client. Notice that we’re passing in the container name from the request query string. Finally, you retrieve a list of the files held in the container by calling the ListBlobs method and binding the result to the GridView.

Now that you can list and display all of the BLOBs in the selected container, you need to extend the web page so that you can upload new files into the container.

Other -----------------
- Using the REST API (part 2) - Authenticating private requests
- Using the REST API (part 1) - Listing BLOBs in a public container using REST
- The basics of BLOBs - Configuring your application to work against the live service
- The basics of BLOBs : Developing against containers (part 3) - Listing containers & Deleting a container
- The basics of BLOBs : Developing against containers (part 2) - Creating a container
- The basics of BLOBs : Developing against containers (part 1) - Accessing the StorageClient library & Accessing development storage
- The basics of BLOBs : Getting started with development storage
- A closer look at the BLOB storage service
- Storing files in a scaled-out fashion is a pain in the NAS (part 2) - The BLOB service approach to file management
- Storing files in a scaled-out fashion is a pain in the NAS (part 1) - Traditional approaches to BLOB management
 
 
25 Inspiring Game of Thrones Quotes
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
programming4us programming4us
Popular tags
Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 windows Phone 7 windows Phone 8
programming4us programming4us
 
programming4us
Natural Miscarriage
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Game Trailer