Hello,
I've a strange problem with substring function.
I'm geting a string from my SQL DataBase and i want to split it to two
substings.
here is what i do:
if(temp.Length>80 && temp.Length<=160)
{
line1_txt.Text=temp.Substring(0,79);
line2_txt.Text=temp.Substring(80,temp.Length-1);
}
with line1_txt i have no problem, when i'm getting to line2_txt i get the
error message:
"Index and length must refer to a location within the string."
when i'm giving in line2 the same substring values like in line1 it works.
How can i split this line into two lines?
Thanks,
Gidi.