Wrox Programmer Forums
BOOK: Professional ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Professional ASP.NET 4 in C# and VB by Bill Evjen, Scott Hanselman, Devin Rader; ISBN: 9780470502204
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 18th, 2012, 02:42 PM
Authorized User
Join Date: Jun 2012
Posts: 45
Thanks: 11
Thanked 0 Times in 0 Posts
Smile Gig Pics(PhotoAlbum)- dropdownlist

My GIG pics(PhotoAlbum/default) displays my top dropdownlist selection immediately. I'd like it to display nothing initiallly, like your example/final.

Where should i look, i've been doing comparisons, but jusr can't find it.
i guess im gonna need to read the whole book again..to master it..

Thanks Imar,
Edgy Eddie
(hey Imar do you like early Genisis or early King Crimson)

Nope, that wasn't it.
What I'm inquiring about is for the dropdown list NOT to EXECUTE initially, when the(photoalbums/default.aspx) page opens/starts up and should display the Empty Template message. Which only happens initially on your example. I am aware of the appendDatabounditems option, I tried it and that wasn't it, it still loaded and displayed the first item in my list. Initially, I want the empty template option to execute.

Thanks Imar for your help and patience, Edgy Eddie (..too bad)

Well, I found the answer. There's nothing wrong with my code, its doing exactly as it should, I was looking at mine and thought i had something wrong and wanted to make it perfect, like yours, when i compared/tested them. Your initial album(id=1) in the drop downlist has no associated pics to display, thus it displays the empty message, as it should. My test data has no empty Album pics, and thats why i never get the empty item message. The page is designed to always show the first dropdownlistitem and its album pics.

So as Emily Litella(SNL/Gilda Radner) would say "oh,that's different,... Never Mind."
Thanks Imar,
Edgy Eddie from Mesquite

Last edited by EDGY; August 26th, 2012 at 04:49 PM.. Reason: Solution found - never mind..
Old August 20th, 2012, 09:52 AM
Imar's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

Hi there,

You can add an empty item in Markup View and then set AppendDataBoundItems to true.

>> (hey Imar do you like early Genisis or early King Crimson)

Not really....

Imar Spaanjaars
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Old August 20th, 2012, 01:40 PM
Friend of Wrox
Join Date: Oct 2009
Posts: 341
Thanks: 14
Thanked 3 Times in 3 Posts

Hi there,
you may try this as Imar has suggested

<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" DataTextField="Name" DataValueField="Id" AppendDataBoundItems="true">
        <asp:ListItem Value="">Select Album</asp:ListItem>
Hope it helps you
The Following User Says Thank You to sophia For This Useful Post:
EDGY (August 26th, 2012)

Similar Threads
Thread Thread Starter Forum Replies Last Post
View Pics according photoAlbumOwner jack_hilary BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 6 May 28th, 2010 04:19 AM
uploading pics dhoward VB.NET 2002/2003 Basics 4 April 29th, 2008 01:54 PM
PhotoAlbum! ostwald BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 18 October 23rd, 2007 03:11 PM
Problems with loading external pics into an IFrame nancy Classic ASP Databases 2 April 26th, 2005 10:33 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.