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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top