Newbie Question about DropList and Page Load

  • Thread starter Thread starter Meir Rotfleisch
  • Start date Start date
M

Meir Rotfleisch

Hi

I am trying to populate the Droplist with Items during the page load event
however the Droplist remains blank..

The code is

Dim I As Integer

if not page.ispostback then

For I = 1 To 31

Me.DropDownList1.Items.Add(I.ToString())

Next



End if





Suggestions?

Regards

Meir
 
Hi

Is very strange!

Can you post the code of the whole page?

Ciao
Giorgio
 
I am trying to populate the Droplist with Items during the page load event
however the Droplist remains blank..
...
Me.DropDownList1.Items.Add(I.ToString())

Try to add instances of 'System.Web.UI.WebControls.ListItem'
instead of strings (i.e. the above 'I.ToString()').
 
Back
Top