Skip to content

Instantly share code, notes, and snippets.

@yushulx
Created September 8, 2020 05:24
Show Gist options
  • Select an option

  • Save yushulx/664cf4442e2dcade055ba593e30e72ea to your computer and use it in GitHub Desktop.

Select an option

Save yushulx/664cf4442e2dcade055ba593e30e72ea to your computer and use it in GitHub Desktop.
<button class="btn btn-primary" @onclick="ReadBarcodes">Read Barcodes from Files</button>
@code {
private static String result = "No Barcode Found";
protected override void OnInitialized()
{
JSRuntime.InvokeVoidAsync("jsFunctions.init", DotNetObjectReference.Create(this));
}
public async Task ReadBarcodes()
{
await JSRuntime.InvokeVoidAsync(
"jsFunctions.selectFile");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment