I can't access the variable value when using it in the if-statement     if (@Produkt.KategoriID == value). It says "the name 'value' does not exist in current context". How can i make it so I can use the variable in the if-statement?
@if (Model != null)
    {
        <div style="margin-left: 30%; margin-right: 25%;">
            <label> Choose:    </label>
            <select name="Choose" id="select">
                <option value="1">None</option>
                <option value="2">Bronze</option>
                <option value="3" selected>Silver</option>
                <option value="4">Gold</option>
            </select>
        </div>
        <script type="text/javascript">
            var choice = document.getelementbyid('select');
            var value = choice.options[choice.selectedindex].value;
        </script>
        if (@Produkt.KategoriID == value)
        {
        }
    }
 
     
     
    