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

onchange event do not enter to a break point on select tag in Blazor .NET 8

$
0
0

I am trying to debug the OnSelectChanged function. When I select an option, the execution does not hit the breakpoint I set on the line Opcion = opcion; within the OnSelectChanged function.

However, breakpoints in other functions are working correctly. Does anyone know how I can fix this?

I am using Blazor and .NET 8.

.razor file:

<div class="row"><div class="col-sm-3 p-3"><select id="dropdown1" class="form-select" @onchange="@(e => OnSelectChanged(true, e.Value.ToString()))"><option value="">Seleccione una opción</option><!-- Organizacion -->            @if (Opcion == "Organizacion")            {            }<!-- Niveles Web -->            else if (Opcion != "Organizacion" && ListaCategoriasNivel1.Count > 0)            {                @foreach (var categoria in ListaCategoriasNivel1)                {<option value="@categoria.CodigoNivel">@categoria.NombreNivel</option>                }            }</select></div></div>

.razor.cs file:

private void OnSelectChanged(bool status, string opcion){    Opcion = opcion;}

I tried to create another function to see if it hits the breakpoint and that did not work either.


Viewing all articles
Browse latest Browse all 4839

Trending Articles



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