467,146 Members | 1,316 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,146 developers. It's quick & easy.

What would be the best way to add "Please Choose" to a data bound DropDown?

Hi,

I have a DropDown bound to a DataTable and I would like to add "Please
Choose" as the 1st default item. I know that I can add "Please Choose" to
the DataTable; but I wonder if I do the same without manipulating the
DataTable.

Thanks,
Max
Jul 26 '07 #1
  • viewed: 1204
Share:
2 Replies
if you're using ASP.Net 2.0, just change the 'AppendDataBoundItems' property
to 'True', then, in the Items property (or in the tag), add the list item
you need.

--
David Wier
MVP/ASPInsider
http://aspnet101.com
http://iWritePro.com

"Max2006" <al*******@newsgroup.nospamwrote in message
news:uh**************@TK2MSFTNGP06.phx.gbl...
Hi,

I have a DropDown bound to a DataTable and I would like to add "Please
Choose" as the 1st default item. I know that I can add "Please Choose" to
the DataTable; but I wonder if I do the same without manipulating the
DataTable.

Thanks,
Max

Jul 26 '07 #2
Exactly, That was what I was looking for.

Thanks alot.
Max

"David Wier" <da*******@davidwier.nospam.comwrote in message
news:u3**************@TK2MSFTNGP02.phx.gbl...
if you're using ASP.Net 2.0, just change the 'AppendDataBoundItems'
property to 'True', then, in the Items property (or in the tag), add the
list item you need.

--
David Wier
MVP/ASPInsider
http://aspnet101.com
http://iWritePro.com

"Max2006" <al*******@newsgroup.nospamwrote in message
news:uh**************@TK2MSFTNGP06.phx.gbl...
>Hi,

I have a DropDown bound to a DataTable and I would like to add "Please
Choose" as the 1st default item. I know that I can add "Please Choose" to
the DataTable; but I wonder if I do the same without manipulating the
DataTable.

Thanks,
Max


Jul 26 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by \Dandy\ Randy | last post: by
6 posts views Thread by chris yoker via DotNetMonster.com | last post: by
reply views Thread by guido_brasletti | last post: by
1 post views Thread by =?Utf-8?B?TWFyayBIb2xsYW5kZXI=?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.