Click here to Skip to main content
15,883,883 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello,

I want to develop application for qrcode crate and qr code scanner using webcam.

I am using this code for create QRCode:-
C#
protected void BtnQRCodeCreate_Click(object sender, EventArgs e)
    {
        QRCodeEncoder encoder = new QRCodeEncoder();
        Bitmap img = encoder.Encode(TxtQRCode.Text);
        img.Save(@"~\QRCodeImage\" + TxtQRCode.Text + ".jpg", ImageFormat.Jpeg);
        QRImage.ImageUrl = "~/QRCodeImage/" + TxtQRCode.Text + ".jpg";
    }
    protected void BtnUpload_Click(object sender, EventArgs e)
    {
        if (FileUpload1.PostedFile != null)
        {
            QRImage.ImageUrl = null;
            string FileName = Path.GetFileName(FileUpload1.PostedFile.FileName);
            //Save files to images folder
            FileUpload1.SaveAs(Server.MapPath("~/QRCodeImage/" + FileName));
            this.QRImage.ImageUrl = "~/QRCodeImage/" + FileName;
        }
    }

QrCode image its creating but we are not be scanning, QRCode image using usb webcam.

How can be possible using webcam in c# asp.net?

I need, when i will be scan our QRCode image then it should be text display regarding this QRCode image.

Please help me.

Thanks in Advance.

Ankit Agarwal
Software Engineer
Posted
Updated 19-Jan-21 18:46pm
v4
Comments
F-ES Sitecore 10-Jul-15 10:23am    
You can't access the web cam from your server code. Depending on what the client browser supports you might be able to do it with html5. Google "access webcam html5" for more info. Or just google "scan qrcode asp.net" as this question is asked very frequently.

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