TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Yogesh Ghorpade
NA
762
148.2k
how to Generate QR code dynamically and send to mail ??
Sep 10 2018 1:21 AM
Hello
how to Generate QR code dynamically and Send to mail Using C# Window Application
QRCodeGenerator qrGenerator = new QRCodeGenerator();
QRCodeGenerator.QRCode qrCode = qrGenerator.CreateQrCode(dtAccess.Rows[rows]["InvitationId"].ToString() + "_" + dtAccess.Rows[rows]["First_Name"].ToString() + "_" + dtAccess.Rows[rows]["Last_Name"].ToString() + "_" + dtAccess.Rows[rows]["Mobile"].ToString() + "_" + dtAccess.Rows[rows]["Email_1"].ToString(), QRCodeGenerator.ECCLevel.Q);
Bitmap qrCodeImage = qrCode.GetGraphic(20);
System.Web.UI.WebControls.Image imgBarCode = new System.Web.UI.WebControls.Image();
imgBarCode.Height = 120;
imgBarCode.Width = 120;
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);
}
string imageContent = "<img src='" + imgBarCode.ImageUrl + "' alt='Alternate Text' />";
string body = "Hello {0},<br /><br />QR Code For Event Name, At Address,Date,Time <br /><br />" + imageContent + "<br/><br />" + dtAccess.Rows[rows]["InvitationId"].ToString() + "<br/><br/>Thanks.";
MultipleRecipeintEmail(dtAccess.Rows[rows]["Email_1"].ToString(), "Invitation", body, imgBarCode.ImageUrl);
}
}
I am using this code mail send but image not display. Please Help!!
Reply
Answers (
5
)
C# North American job demand
Firebase and C#