Dim cmd3 As New SqlClient.SqlDataAdapter("Select * from tblPatientNote where lngPatientid = '" & lngpatientid & "' order by bytNote, dtmcreate desc", Connection1)
Dim countnotes As Integer
Dim note, strnote, strcreate, memnote, dtmcreate, notebc, notev, strnotev, strcreatev, memnotev, dtmcreatev
Try
countnotes = cmd3.Fill(dsNotes, "tblPatientNote")
Catch ex As Exception
MsgBox(ex.Message)
End Try
Dim numCtls As Integer = 5
Dim i As Integer = 0
Do While i <> countnotes
' Do While i < numCtls
Dim ctlLabel As New Label
ctlLabel.Name = "Label" & i.ToString()
ctlLabel.Text = "Here's Text box #" & i.ToString() & ":"
Panel1.Controls.Add(ctlLabel, 0, i)
Dim ctlTextBox As New TextBox
ctlTextBox.Name = "ctlTextBox" & i.ToString()
ctlTextBox.Text = "TextBox" & i.ToString()
Panel1.Controls.Add(ctlTextBox, 1, i)
i += 1
'End While
' i = i + 1
Loop
|