how to check that the attribute value is selected

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 years ago
attributeValue one, two
How to check that the attribute value is selected two ?

@foreach (var attributeValue in attribute.Values)
                        {
                            <option selected="@attributeValue.IsPreSelected" value="@attributeValue.Id">@attributeValue.Name</option>
                        }
3 years ago
The code you show is the Razor code that generates the html to display.  If you want to examine the selected value in the client side (browser) then you need JavaScript to handle the event (e.g. onchange).  Otherwise you do it in the controller, which seems related to your other post  (please don't duplicate posts)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.