Hi,
After you load your drop list with data, you can then insert a row at the
top as follows:
DropDownList1.Items.Insert(0, "Select one")
Does that answer your question?
Thank you, Mike
Microsoft, ASP.NET Support Professional
Microsoft highly recommends to all of our customers that they visit the
http://www.microsoft.com/protect site and perform the three straightforward
steps listed to improve your computer’s security.
This posting is provided "AS IS", with no warranties, and confers no rights.
--------------------
[quoted text, click to view] > Content-Class: urn:content-classes:message
> From: "Mark Aurit" <mark.aurit@ngc.com>
> Sender: "Mark Aurit" <mark.aurit@ngc.com>
> Subject: Blank top row in ListBox
> Date: Mon, 13 Oct 2003 14:38:40 -0700
> Lines: 12
> Message-ID: <29f0601c391d2$5e08a390$a601280a@phx.gbl>
> MIME-Version: 1.0
> Content-Type: text/plain;
> charset="iso-8859-1"
> Content-Transfer-Encoding: 7bit
> X-Newsreader: Microsoft CDO for Windows 2000
> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
> Thread-Index: AcOR0l4I04h+w5wxSVSyCYjzi6t1Jw==
> Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
> Path: cpmsftngxa06.phx.gbl
> Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.webcontrols:15333
> NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
> X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
>
> Im populating a drop down list box from a database, and Id
> like the top row to be blank - or be populated with the
> words " select from entries below ", or something along
> those lines.
> I suppose I could do this at the database level, but it
> seems it would be cleaner if I could populate the control
> and before rendering it insert the line at the top. There
> is a prerender event for the list box, but Im having a
> difficult time with this, and I was hoping someone else
> had some ideas.
> Can anyone help?
> Thanks, Mark
>