Create a Picture Album using ListView

This article will show how you can create a photo album using ListView control. It will explore GroupTemplate of ListView and how we can group multiple images together in Listview; thus creating an album effect.
The instruction starts from creating a new ASP.NET website using C# or VB.NET. Then add a FileUpload control and button control to upload the selected on button click.
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head runat=”server”>
<title>Untitled Page</title>
</head>
<body>
<form id=”form1″ runat=”server”>
<div>
Image
<asp:Label ID=”lblTags” runat=”server” Text=”Tags”></asp:Label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:TextBox ID=”txtTags” runat=”server”></asp:TextBox>
<br />
<asp:Label ID=”lblImage” runat=”server” Text=”Upload Picture”></asp:Label>
&nbsp;&nbsp;&nbsp;&nbsp;
<asp:FileUpload ID=”imgUpload” runat=”server” />
<br />
<br />
<asp:Button ID=”btnSubmit” runat=”server” onclick=”btnSubmit_Click”
Text=”Submit” />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp<asp:Label ID=”lblResult” runat=”server” ForeColor=”#0066FF”></asp:Label>
<br />
<hr />
</div>

</form>
</body>
</html>

Then using the code in this article, you can complete a photo album using ListView.

Read the rest of the tutorial here: http://www.dotnetcurry.com/ShowArticle.aspx?ID=175

Leave a Reply

Your email address will not be published. Required fields are marked *