hi,
try this code...,
create control array in coding for your 5 textboxes.
declare textbox control array in class.
private TextBox[] textBoxes;
and follow the below code..
string[] lines = richTextBox1.Lines;
textBoxes = new TextBox[] { myTextBoxForLineOne, myTextBoxForLineTwo, myTextBoxForLineThree, myTextBoxForLineFour, myTextBoxForLineFive};
int txtboxCnt = 0;
if (lines.Length >= 5)
{
for (int i=0; i< lines.Length; i++)
{
if (lines[i].Trim() != "")
{
textBoxes[txtboxCnt].Text = lines[i];
txtboxCnt++;
}
}
}
regards,
Prakash.T