Say in web.config, I have

<myOptions>
    <optGroup name="optionGroup1">
        <add key="myKey1" value="myValue1" />
        <add key="myKey1" value="myValue2" />
        ...
    </optGroup >
</myOptions>

I want to loop through optionGroup1 and render as HTML using the key and value fields.

<select>
    <option value="myKey1">myValue1</option>
    <option value="myKey2">myValue2</option>
    ...
</select>

From Googling, I have tried

<option runat="server" value="<%$ myOptions:formOptions %>">some key's value</option>

Related posts

Recent Viewed