Click here to Skip to main content
15,884,472 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
hi
I used the code below to build QrCode, with Refrence QRCoder.dll
English was displayed without problems
But
Persian text when I was just the first two letters of the word Profile
Code:
C#
protected void btnGenerate_Click(object sender, EventArgs e)
{
 string code = txtCode.Text;
 QRCodeGenerator qrGenerator = new QRCodeGenerator();
 QRCodeGenerator.QRCode qrCode = qrGenerator.CreateQrCode(code,QRCodeGenerator.ECCLevel.Q);
 System.Web.UI.WebControls.Image imgBarCode = new System.Web.UI.WebControls.Image();
 imgBarCode.Height = 150;
 imgBarCode.Width = 150;
 using (Bitmap bitMap = qrCode.GetGraphic(20))
  {
    using (MemoryStream ms = new MemoryStream())
    {
      bitMap.Save(ms, System.Drawing.Imaging.ImageFormat.Png);
      byte[] byteImage = ms.ToArray();
      imgBarCode.ImageUrl = "data:image/png;base64," +  Convert.ToBase64String(byteImage);
     }
       plBarCode.Controls.Add(imgBarCode);
   }
}

Please help me
Wait answered؟
Grateful
Posted
Updated 3-May-15 22:39pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900