Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Blazor InputFile onchange doesn't trigger the method

$
0
0
@page "/fileup"<h3>FileUp</h3><InputFile OnChange="@UploadedExcel" accept=".xlsx" />@code {    public async Task UploadedExcel(InputFileChangeEventArgs e)    {        Console.WriteLine("Hello");    }}

The code should be basic enough but it doesn't trigger the task down below when I upload a file. Am I missing something?

I have tried a few different things including changing to multifile and all. I have another page with full code block that I don't wanna sahre because of many unrelated things. But this on itself should work right?Network

I was missing the @rendermode InteractiveAuto at the top of the page. After adding it, it triggered my method.


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>