In this section we will create our first program using Azure blobs. This article creates a simple web page where we upload image files which are stored in azure blobs. We have also created a simple search text box which will help us to search the image blobs with the image file name.

In this section we will create our first program using Azure blobs. This article creates a simple web page where we upload image files which are stored in azure blobs. We have also created a simple search text box which will help us to search the image blobs with the image file name.

The first step is to a create a web role project. In case you are fresher in Azure, you can go through http://www.dotnetfunda.com/articles/article758-simple-5-steps-to-run-your-first-azure-program-.aspx to understand how to create a web role project. So let’s create a simple project with name ‘BlobStorage’. Once you have created the project it creates two projects one is the cloud service project and the other is the web role project. Cloud service project has all the necessary configuration needed for your cloud service project while the web role project is your asp.net project.

Give a nice name to the container and create the container object using the client object which you have just created using the blob end point. Call the ‘CreateIfnotExist’ method of the container to ensure that you create the blob container only if it does not exist to avoid any errors.

// Get the reference to container
CloudBlobContainer objContainer = objClient.GetContainerReference("mycontainer");
// Create the container if it does not exist
objContainer.CreateIfNotExist();

The final step is to create the ASPX page which will help us upload image files in the blob container which we just created in the ‘WebRole.cs’ file. You can see in t he below figure we have create a browse button which help us upload image files and a search text box which will help us search blob files.So create the below defined ASPX UI.

In the above ASPX CS UI first get the reference to the below specified name spaces.

using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.StorageClient;

In the file upload button we need to insert the below code snippet to upload the file. So get access to the container object ‘MyContainer’ and call the ‘GetBlobReference’ function to get access to the cloud blob object.

In the same UI we have provided a search object to search a blob. To search a blob first get access to the container object and call the ‘GetBlobReference’ function with the blob name to get reference to the cloud object.

// Get the blob reference using the blob name provided in the search
CloudBlob obj = objContainer.GetBlobReference(txtSearch.Text);
BlobStream blobstream = obj.OpenRead();

Read the blob stream using the blob steam object and finally attach this stream with the Image object to display the same in the HTTP response.

Hello everyone! I have this information for windows 10 OS alarm feature and i would like to share this with all of you, so am suggesting this Homepage where you http://alarmsinwindows10.com need to go for knowledge of how to activate alarm function.