You can download the sample code:
[ASP.NET-C#] Read barcode from webcam[
^]
Steps to implement the solution
1. Use HTML5 to open a webcam in your web browser.
2. Display the webcam preview on a canvas.
3. Send the canvas data (base64 string) to the server-side that built in ASP.NET.
4. Read barcodes from the image data with any barcode SDK you like.