Placeholder Control Question

Results 1 to 2 of 2

Thread: Placeholder Control Question

  1. #1
    Join Date
    Dec 1969

    Default Placeholder Control Question

    I have 4 dynamically created drop down boxes within a placeholder. How can i reference these drop down boxes&#039; values. I wanna be able to get each from each drop down box. This is how I created my drop down boxes within the placeholder:<BR> For i = 0 To dst.Tables(0).Rows.Count - 1<BR> Dim dd As New DropDownList()<BR> cmdObject.CommandText = sql<BR> dr1 = cmdTKP.ExecuteReader<BR> dd.DataSource = dr1<BR> dd.DataTextField = "strName"<BR> dd.DataValueField = "ID"<BR> dd.DataBind()<BR> dd.SelectedIndex = i<BR> placeHolderObject.Controls.Add(dd)<BR> dr1.Close()<BR> Next<BR>Thx for your help

  2. #2
    Join Date
    Dec 1969

    Default RE: Placeholder Control Question

    If you do not set the ID property of a control, you can obtain a reference to the control through its parent control&#039;s Controls property.<BR>placeHolderObject.Controls(0).Selecte dIndex

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts