【发布时间】:2020-07-21 00:59:58
【问题描述】:
试图让一个选择/选项 html 元素在我的 blazor 应用程序中工作,但字符串的绑定仍然是“空的”
我不明白什么?
/* It even defaults to so "A B C" but still is not bound */
<select bind="@divValue">
<option value="ABC">A B C</option>
<option value="DEF">D E F</option>
<option value="GHI">G H I</option>
</select>
@code {
string divValue = string.Empty;
....
/* value = string.Empty still*/
string test = divValue
}
【问题讨论】: