Computer is having data and english hindi lanuguage all time. and text is very small
but in television we have visual things , and text is very large if it had
Computer is having data and english hindi lanuguage all time. and text is very small
but in television we have visual things , and text is very large if it had
string author = "Mahesh Chand";
// Convert a C# string to a byte array
byte[] bytes = Encoding.ASCII.GetBytes(author);
foreach (byte b in bytes)
{
Response.Write(b );
Response.Write(Environment.NewLine);
}
bytes to string
string myString = Encoding.ASCII.GetString(bytes);
Response.Write(str);
using fileupload control
Convert.ToBase64String(fileUpload1.FileBytes);
using memory stream
Stream fs = fileUpload1.PostedFile.InputStream;
BinaryReader br = new BinaryReader(fs);
Byte[] bytes = br.ReadBytes((int)fs.Length);
Convert.ToBase64String(bytes );
base64 string meaning
the upper- and lower-case Roman alphabet characters (A–Z, a–z), the numerals (0–9), and the "+" and "/" symbols, with the "=" symbol as a special suffix code
using memory stream
MemoryStream m = new MemoryStream(bytes);
System.Drawing.Image MyImage = System.Drawing.Image.FromStream(m);
MyImage.Save(filepathandname)
====================
using fileupload control
fileUpload1.FileBytes;
string filepathandname = Server.MapPath(string.Format("~/uploads/{0}-{1}.{2}", DateTime.Now.ToShortDateString(), Guid.NewGuid(), ".png"));
MyImage.Save(filepathandname)