aspnetcore/test/testapps/BasicTestApp/BindCasesComponent.cshtml

32 lines
1.1 KiB
Plaintext

<h2>Textbox</h2>
<p>
Initially blank:
<input id="textbox-initially-blank" @bind(textboxInitiallyBlankValue) />
<span id="textbox-initially-blank-value">@textboxInitiallyBlankValue</span>
</p>
<p>
Initially populated:
<input id="textbox-initially-populated" @bind(textboxInitiallyPopulatedValue) />
<span id="textbox-initially-populated-value">@textboxInitiallyPopulatedValue</span>
</p>
<h2>Checkbox</h2>
<p>
Initially unchecked:
<input id="checkbox-initially-unchecked" @bind(checkboxInitiallyUncheckedValue) type="checkbox" />
<span id="checkbox-initially-unchecked-value">@checkboxInitiallyUncheckedValue</span>
</p>
<p>
Initially checked:
<input id="checkbox-initially-checked" @bind(checkboxInitiallyCheckedValue) type="checkbox" />
<span id="checkbox-initially-checked-value">@checkboxInitiallyCheckedValue</span>
</p>
@functions {
string textboxInitiallyBlankValue = null;
string textboxInitiallyPopulatedValue = "Hello";
bool checkboxInitiallyUncheckedValue = false;
bool checkboxInitiallyCheckedValue = true;
}