WIndows forms or ASP.NET?
With WIndows forms, you can rebuild the days, based on the year and month
(overall month, but you do have February changing based on year). With
ASP.NET, you rebuild the select with JavaScript, which means you have to
emit it.
The other issue you have is one of culture. Not as big with a windows app,
as you simply change config elements. With a web control, however, you
either have to ship the resource file with the control (not impossible, but
a bit more difficult, as it is an extra file to have missing) or you have to
encapsulate the logic, which means you have to do more work up front.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
Blog:
http://feeds.feedburner.com/GregoryBeamer
*********************************************
| Think outside the box |
*********************************************
"sonum" <> wrote in message
news:a45a8398-3bf7-4749-b0ef-...
>I am creating a custom control with 3 dropdownlists (day, month,
> year)
> which I will use as a date selector. I want to be able to reuse all my
> code
> and cut programming repetition down a lot (I don't mind spending a lot
> of
> time on something if I don't have to do it again).
>
> My question is, with the day selector, how should I store a list of
> numbers
> from 1 to 31 to bind to the dropdownlistbox? I could run a loop and
> create
> it like that but why not just have an existing array or enum or
> something.
>
>
> With the month selector I am using an enumerator to hold all the month
> names
> but it doesnt seem efficient to use one for a list of numbers.
>
>
> Does anyone have any suggestions? If you help me out I will even give
> you
> this control when I'm finished (and anyone who wants it).
>
>