Hi Kolade,
First convert the URL to Bytes and then bytes to base64.
URl to byte :
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
HttpWebResponse response = (HttpWebResponse)req.GetResponse();
stream = response.GetResponseStream();
using (BinaryReader br = new BinaryReader(stream))
{
int lenth = (int)(response.ContentLength);
buf = br.ReadBytes(lenth);
br.Close();
}
byte to Base 64:
_byte=buf;
_sb.Append(Convert.ToBase64String(_byte, 0, _byte.Length));
let me know if this helps you.
Thank you Karan Verma.
I would implement and revert back.
BR.
Hello Karan,
As regards the code outline you gave me on the URI to base64. Apology for the late response.
I like to add that, am not a code person. Wanted to know if you could help transform the code into a usable format. Would more than appreciate that.
With much respect,
Kolade.
Hi kolade,
Find attached dll. There are two methods one return string having base64 data and other return list with base64 data and file name.
Hi Karan,
Many thanks for your help, and for reaching out.
Howbeit, after testing the SMO from the dll, here is the result;
1. The SMO method 'URLtoBase64WithFileName' only return the FileName.
2. The SMO method 'URLtoBase64' did not return any value.
In conclusion, both methods did not return the base64.
Thanks for the effort.
Regards,
Hello Karan,
Thanks for the help with the dll for converting url to base64. Your solution came in very handy.
Am not sure if you have a dll that can also help convert an ADO query to csv file (Comma seprated value).
I will be more than grateful if I can have the resource for ADO query to csv file.
Many thanks for your support.
Best regards,
Kolade.