In example.aspx, i have a html textbox named txtbox_1. In it, I have the following value:

1a,3d,2cc,wedd,aqq

I would like to read individual values separated by commas and place it different textbosz.
currently i can read the textbox value as a whole and not individually.

Hope this is clear. Would appreciate any help! Thanks!

Recommended Answers

try something like this

string[] strValues = txtHtmlTextBox.Text.Split(',');

for(int i =0 ; i<= strValues.Length-1;i++)
{
    //assign values to your textboxes like this
    //txtDemo.Text=strValues[i];

}

Regards

Jump to Post

All 2 Replies

try something like this

string[] strValues = txtHtmlTextBox.Text.Split(',');

for(int i =0 ; i<= strValues.Length-1;i++)
{
    //assign values to your textboxes like this
    //txtDemo.Text=strValues[i];

}

Regards

Thanks! You've been a great help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.