Hi,
First of all I would like to know the textBox1.Text.
Does above has text contains "@" character?
Second is that how many "@" in textBox1.Text?
Executing these code:
string mytext = textBox1.Text;
string[] parts = mytext.Split(mytext,"@");
textBox2.Text = parts[1];
Scenario 1
mytext contains 1 "@" character.
textBox2.Text = parts[1];
Because index start at 0
Try to execute:
textBox2.Text = parts[0];
Array index start at 0.
Please vote if could help...