Simon

Simon

  • NA
  • 1
  • 0

B64 Substring

Nov 14 2005 11:09 AM
Hello

I've managed to encode an image file to base64 using
"convert.ToBase64String"
I know you cannot send the whole string to the server, but you need to send
so many char's at a time which i think is about 76. Is there a way in which
i can do this?
The whole base64 string is in the varible "b64String" but i wish to send 76
chars at a time. I know i can use the substring function but the code i'm using doesn't work, any advance or help?

int size = b64String.Length;
int csize = 0;
string chunky;

while (csize < size + 1)
{
chunky = b64String.Substring(csize, 76);
csize = csize + 76;
Console.Write(chunky);
}



Thanks

Si

Answers (1)