Newbie Question about DropList and Page Load

  • Thread starter Meir Rotfleisch
  • 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
 
G

Giorgio Parmeggiani

Hi

Is very strange!

Can you post the code of the whole page?

Ciao
Giorgio
 
T

Thomas F.B.

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()').
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,157
Latest member
MercedesE4
Top