Опубликован: 30.05.2011 | Доступ: свободный | Студентов: 2407 / 234 | Оценка: 4.12 / 4.41 | Длительность: 12:00:00
Специальности: Программист, Архитектор программного обеспечения
Теги:
Самостоятельная работа 6:
Работа с Windows Azure Blob
Список вспомогательных материалов
Работа с Windows Azure Blob
- http://msdn.microsoft.com/en-us/wazplatformtrainingcourse_exploringwindowsazurestoragevs2010_topic3
- http://blogs.msdn.com/b/jnak/archive/2010/01/11/walkthrough-windows-azure-blob-storage-nov-2009-and-later.aspx
- http://blogs.msdn.com/b/jnak/archive/2008/10/29/walkthrough-simple-blob-storage-sample.aspx
- http://wotudo.net/blogs/wotudo/archive/2010/02/16/copying-files-to-windows-azure-blob-storage.aspx
Repeater
- http://msdn.microsoft.com/ru-ru/library/system.web.ui.webcontrols.repeater.aspx
- http://www.w3schools.com/ASPNET/aspnet_repeater.asp
- http://articles.sitepoint.com/article/asp-net-repeater-control
Приложение А asp - код страницы AzureBlobSample.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AzureBlobSample.aspx.cs" Inherits="WebRole1.AzureBlobSample" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <style type="text/css"> .style1 { height: 25px; } </style> </head> <body> <form id="form1" runat="server"> <div> <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="X-Large" Text="My Image Gallery - Azure Blob Example"></asp:Label> <br /> <br /> <table style="width:100%;"> <tr> <td> <asp:Label ID="lb_name" runat="server" Text="Название"></asp:Label> </td> <td> <asp:TextBox ID="tb_name" runat="server"></asp:TextBox> </td> </tr> <tr> <td> <asp:Label ID="lb_desc" runat="server" Text="Описание"></asp:Label> </td> <td> <asp:TextBox ID="tb_desc" runat="server"></asp:TextBox> </td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td class="style1"> <asp:Label ID="lb_file" runat="server" Text="Файл"></asp:Label> </td> <td class="style1"> <asp:FileUpload ID="fu_upload" runat="server" /> </td> </tr> <tr> <td> </td> <td> <asp:Button ID="btn_upload" runat="server" onclick="btn_upload_Click" Text="Загрузить" /> </td> </tr> <tr> <td> <asp:Label ID="lb_status" runat="server"></asp:Label> </td> <td> </td> </tr> <tr> <td> </td> <td> <asp:ListView ID="lv_images" runat="server" onitemdatabound="lv_images_ItemDataBound"> <LayoutTemplate> <asp:PlaceHolder ID="itemPlaceholder" runat="server" /> </LayoutTemplate> <EmptyDataTemplate> <h2>No Data Available</h2> </EmptyDataTemplate> <ItemTemplate> <div class="item"> <ul style="width:40em;float:left;clear:left" > <asp:Repeater ID="blobMetadata" runat="server"> <ItemTemplate> <li><%# Eval("Name") %><span><%# Eval("Value") %></span></li> </ItemTemplate> </asp:Repeater> <li> <asp:LinkButton ID="deleteBlob" OnClientClick="return confirm('Delete image?');" CommandName="Delete" CommandArgument='<%# Eval("Uri")%>' runat="server" Text="Удалить" oncommand="OnDeleteImage" /> <asp:LinkButton ID="CopyBlob" OnClientClick="return confirm('Copy image?');" CommandName="Copy" CommandArgument='<%# Eval("Uri")%>' runat="server" Text="Копировать" oncommand="OnCopyImage" /> </li> </ul> <img src="<%# Eval("Uri") %>" alt="<%# Eval("Uri") %>" style="float:left"/> </div> </ItemTemplate> </asp:ListView> </td> </tr> <tr> <td> <br /> </td> <td> </td> </tr> </table> </div> </form> </body> </html>