Ask a Question related to ASP.NET General, Design and Development.
-
Tony #1
Question on dropdownlist
Hi, I need a dropdownlist to select month from 1 to 12. Is there a way that
I don't need to databind with a database table? cos i just feel a little
stupid to create a Month table have int from 1 to 12 in it.
Tony Guest
-
Question about a user control derived from DropDownList
I posted this in a different group yesterday with no responses, so I'll try here. I have a simple control that is in a CS file (not ASCX). It is... -
HELP! DropDownList Items property in composite control -- collection editor support question!
Hi, I have a composite web custom control consisting of a textbox, a button, and a dropdownlist.. I'm trying to expose the Items property from... -
HELP with ASP.NET DropDownList Box ! : )
Hi all, I have a DropDownList on my page created in Design Time calledddlDate. In code, I do the following: 1 ddlDate = New DropDownList() <-... -
<asp:DropDownList >
It just doesn't work like that - - you need to either bind data to the datalist in code, or manually add the items, one by one, where you're doing... -
question on DropDownList control.
hi, a newbie question I have two dropdownlist controls, one is for years, 2000-2003, the other is for month, 1-12. I am supposed to get all the... -
Victor Garcia Aprea [MVP] #2
Re: Question on dropdownlist
Hi Tony,
Select the DropDownList, press F4, click the "..." on the Items property and
add your items there.
--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET? Read my blog:
[url]http://obies.com/vga/blog.aspx[/url]
To contact me remove 'NOSPAM'. Please post all questions to the newsgroup
and not by private mail.
"Tony" <gdxing@hotmail.com> wrote in message
news:%23djo9A0SDHA.3768@tk2msftngp13.phx.gbl...that> Hi, I need a dropdownlist to select month from 1 to 12. Is there a way> I don't need to databind with a database table? cos i just feel a little
> stupid to create a Month table have int from 1 to 12 in it.
>
>
>
Victor Garcia Aprea [MVP] Guest
-
Steve C. Orr, MCSD #3
Re: Question on dropdownlist
You can use the DropDownList.Items.Add method to add the months at run time.
Here's more info and an example:
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebuiwebcontrolslistitemcollectionclass topic.asp[/url]
Or you could just add the values to your HTML at design time.
Here's more info and an example:
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWebUIWebControlsDropDownListClassTopic. asp[/url]
--
I hope this helps,
Steve C. Orr, MCSD
[url]http://Steve.Orr.net[/url]
"Tony" <gdxing@hotmail.com> wrote in message
news:%23djo9A0SDHA.3768@tk2msftngp13.phx.gbl...that> Hi, I need a dropdownlist to select month from 1 to 12. Is there a way> I don't need to databind with a database table? cos i just feel a little
> stupid to create a Month table have int from 1 to 12 in it.
>
>
>
Steve C. Orr, MCSD Guest



Reply With Quote

