S
SD
Hello,
I have a form that has a panel container where I'm adding textboxes
dynamically based on a query to database, so I'm looping through the
records.
The problem I have is that once built, I need to pass those textboxes values
to another for to build the parameters for a report.
Here is the sample:
While myReader.Read()
Dim txtBox As New TextBox
Dim lbLabel As New Label
parCounter = parCounter + 1
' Create dynamic controls here.
lbLabel.ID = "Label" + parCounter.ToString()
lbLabel.Text = myReader("parameter") & " "
lbLabel.Font.Bold = True
lbLabel.Font.Size = FontUnit.Parse(15)
lbLabel.ForeColor = Color.Navy
Page.Controls.Add(lbLabel)
txtBox.ID = "Textbox" + parCounter.ToString()
Page.Controls.Add(txtBox)
Page.Controls.Add(New LiteralControl("<br>"))
End While
Dim objButton As New Button
objButton.Text = " Run Report "
objButton.ID = "ButtonID"
'AddHandler objButton.Click, AddressOf ButtonID_Click
Panel1.Controls.Add(New LiteralControl("<br>"))
Panel1.Controls.Add(objButton)
So now on the postback I need to parse through all these values, but can't
find a single routine to handle this.
Any ideas???
SD
I have a form that has a panel container where I'm adding textboxes
dynamically based on a query to database, so I'm looping through the
records.
The problem I have is that once built, I need to pass those textboxes values
to another for to build the parameters for a report.
Here is the sample:
While myReader.Read()
Dim txtBox As New TextBox
Dim lbLabel As New Label
parCounter = parCounter + 1
' Create dynamic controls here.
lbLabel.ID = "Label" + parCounter.ToString()
lbLabel.Text = myReader("parameter") & " "
lbLabel.Font.Bold = True
lbLabel.Font.Size = FontUnit.Parse(15)
lbLabel.ForeColor = Color.Navy
Page.Controls.Add(lbLabel)
txtBox.ID = "Textbox" + parCounter.ToString()
Page.Controls.Add(txtBox)
Page.Controls.Add(New LiteralControl("<br>"))
End While
Dim objButton As New Button
objButton.Text = " Run Report "
objButton.ID = "ButtonID"
'AddHandler objButton.Click, AddressOf ButtonID_Click
Panel1.Controls.Add(New LiteralControl("<br>"))
Panel1.Controls.Add(objButton)
So now on the postback I need to parse through all these values, but can't
find a single routine to handle this.
Any ideas???
SD