DataSet GetResponse(string str_BlogUrl)
{
WebResponse ObjWebResp;
WebRequest ObjWebReq;
StreamReader ObjReader;
XmlTextReader xmlread;
ObjWebReq = WebRequest.Create(str_BlogUrl);
ObjWebReq.Timeout = 6000;
ObjWebResp = ObjWebReq.GetResponse();
ObjReader = new StreamReader(ObjWebResp.GetResponseStream());
xmlread = new XmlTextReader(ObjReader);
DataSet ds = new DataSet();
ds.ReadXml(xmlread);
ObjReader.Close();
ObjReader.Dispose();
ObjWebResp.Close();
return ds;
}
This blog provide knowledge of all type of query. I want to share my experience with all.
Tuesday, 31 March 2009
Monday, 30 March 2009
Convert Image into Base64String
//convert image into Base64string
string GetBase64String(string str_imagepathString)
{
string str_image = str_imagepathString;
WebClient wc = new WebClient();
byte[] myimage;
string str_base64 = null;
myimage = wc.DownloadData(str_image);
str_base64 = Convert.ToBase64String(myimage);
return str_base64;
}
string GetBase64String(string str_imagepathString)
{
string str_image = str_imagepathString;
WebClient wc = new WebClient();
byte[] myimage;
string str_base64 = null;
myimage = wc.DownloadData(str_image);
str_base64 = Convert.ToBase64String(myimage);
return str_base64;
}
Subscribe to:
Posts (Atom)