Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Professional ASP.NET 4 : in C# and VB
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 18th, 2012, 02:42 PM
Authorized User
Points: 203, Level: 4
Points: 203, Level: 4 Points: 203, Level: 4 Points: 203, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2012
Location: Mesquite Texas
Posts: 45
Thanks: 11
Thanked 0 Times in 0 Posts
Smile Gig Pics(PhotoAlbum)- dropdownlist

Imar,
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..
  #2 (permalink)  
Old August 20th, 2012, 09:52 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

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
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
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!
  #3 (permalink)  
Old August 20th, 2012, 01:40 PM
Friend of Wrox
Points: 1,469, Level: 15
Points: 1,469, Level: 15 Points: 1,469, Level: 15 Points: 1,469, Level: 15
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2009
Posts: 341
Thanks: 14
Thanked 3 Times in 3 Posts
Smile

Hi there,
you may try this as Imar has suggested

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 10:56 PM.


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