Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Question on dropdownlist

Reply
Thread Tools

Question on dropdownlist

 
 
Tony
Guest
Posts: n/a
 
      07-16-2003
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.



 
Reply With Quote
 
 
 
 
Victor Garcia Aprea [MVP]
Guest
Posts: n/a
 
      07-16-2003
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:
http://obies.com/vga/blog.aspx
To contact me remove 'NOSPAM'. Please post all questions to the newsgroup
and not by private mail.

"Tony" <> wrote in message
news:%...
> 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.
>
>
>



 
Reply With Quote
 
 
 
 
Steve C. Orr, MCSD
Guest
Posts: n/a
 
      07-16-2003
You can use the DropDownList.Items.Add method to add the months at run time.
Here's more info and an example:
http://msdn.microsoft.com/library/de...classtopic.asp

Or you could just add the values to your HTML at design time.
Here's more info and an example:
http://msdn.microsoft.com/library/de...ClassTopic.asp

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net



"Tony" <> wrote in message
news:%...
> 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.
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DropDownList inside GridView: How to set SelectedIndex for the DropDownList? keithb ASP .Net 1 11-01-2006 05:24 AM
GridView: Filter DropDownList for another DropDownList =?Utf-8?B?SnVhbmpv?= ASP .Net 0 12-29-2005 07:44 AM
GridView: Filtr DropDownList from another DropDownList =?Utf-8?B?SnVhbmpv?= ASP .Net 0 12-23-2005 01:31 PM
databinding a Dropdownlist to another dropdownlist tshad ASP .Net 8 10-19-2005 10:00 PM
Using a data-bind dropdownlist to populate another data-bind dropdownlist mr2_93 ASP .Net 1 10-02-2005 05:07 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57