Still A Newbie. I would like to replace the long Base64 string with a variable but keep getting error: Index was outside the bounds of the array.
Scenario: I am retrievi
It looks as though:
ClientSigImg = reader[0].ToString();
Is NOT returning a string with a comma in it (please debug and confirm). This means that you will see the error you are describing when this line of code runs:
ClientSigImg1 = ClientSigImg.Split(',')[1];
This is because index 1 will not exist. So, check that you are actually getting the correct data returned from your query.
In addition, once your query does return the correct data you can tidy your code and simply use:
byte[] imageBytes = Convert.FromBase64String(ClientSigImg1);
That is because:
string base64 = @""+ ClientSigImg1 +"";
Doesn't actually do anything other than add empty string before and after your string, hence, doesn't add anything!