473,386 Members | 1,924 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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
2 1357
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: \Dandy\ Randy | last post by:
Hello everyone. I have been following misc posts, as well as reading several FAQ's on this issue, unfortunatley I cannot locate a solution. I am hoping that someone will be able to provide me with...
1
by: metsymani | last post by:
In my web application, I have a search screen coded in ASP.Net. The Search process takes lot of time. So, I need to show a wait page informing the user that "Search is in progress. Please wait" along...
6
by: chris yoker via DotNetMonster.com | last post by:
hiya, i have an xml doc, and I'd like to assign lookup values. Eg, if the "PRODUCT-TYPE" is 6, then I insert "bike" into the innerText. <code> <rows> <row> <PRODUCT-TYPE>6</PRODUCT-TYPE>...
0
by: ujjc001 | last post by:
Here's the layout. Aspx has a repeater on the left, which will call a function to change a session var that holds the usercontrol name to add (i.e. "uc_myusercontrol.ascx") and then calls...
0
by: guido_brasletti | last post by:
Hi, I'm asking for help because I read dozens of threads on this subject, but I still cannot make it work. I'm developing an ASP script (running on a SBS 2k. I'm a beginner with ASP) to use on...
5
by: GS | last post by:
Hi, I have dropdown list bound to a Table, I don't want dropdown list to select first row from a table but rather to display "Choose" and when user clicks it then to display available values. How...
2
by: john sun | last post by:
Hi, Dear gurus, In the web deployment project, there is one option called "Output Assemblies page". The first choice is "Merge all outputs to a single assembly", According to MSDN, "Merges...
3
by: Tom | last post by:
Can someone please explain the non-working aspect of binding to Width? See code below. Thanks !! -- Tom =================================================== using System; using...
1
by: =?Utf-8?B?TWFyayBIb2xsYW5kZXI=?= | last post by:
Hi All, I have registered the steep valley XP Common Controls to the GAC, But I noticed that it does not show up automatically in the Choose Toolbox Items" List. I have to specifically browse to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.