News:

Choose a design and let our professionals help you build a successful website   - ITAcumens

Main Menu

Need help : how to textbox with multiline using loop

Started by dhilipkumar, May 21, 2009, 10:37 AM

Previous topic - Next topic

dhilipkumar


how to code to create  textbox with multiline using loop.....

I have a textbox control that gets populated with an student's name,and then gets populated with another student's name, which should go to the next line

im using VS2009...... if use my VS2005 code it say some error....

While (rdr.Read())
                If EmployeeNameTextBox.Text = String.Empty Then
                    EmployeeNameTextBox.Text = rdr("EmployeeFirstName").ToString() + " " + rdr("EmployeeLastName").ToString()
                Else
                    EmployeeNameTextBox.Text = EmployeeNameTextBox.Text + Environment.NewLine + rdr("EmployeeFirstName").ToString() + " " + rdr("EmployeeLastName").ToString()
                End If
            End While