US1591104 Loc Fix - Replace and add examples (#14311)
* replace and add examples * Update working-with-forms.mdpull/14375/head
parent
ba8e377425
commit
62870871a3
|
@ -640,6 +640,8 @@ Adding HTML [\<option>](https://www.w3.org/wiki/HTML/Elements/option) elements i
|
|||
|
||||
The correct `<option>` element will be selected ( contain the `selected="selected"` attribute) depending on the current `Country` value.
|
||||
|
||||
[!code-csharp[](working-with-forms/sample/final/Controllers/HomeController.cs?range=114-119)]
|
||||
|
||||
```HTML
|
||||
<form method="post" action="/Home/IndexEmpty">
|
||||
<select id="Country" name="Country">
|
||||
|
|
|
@ -103,7 +103,7 @@ namespace FormsTagHelper.Controllers
|
|||
if (ModelState.IsValid)
|
||||
{
|
||||
var msg = !System.String.IsNullOrEmpty(model.Country) ? model.Country
|
||||
: "No slection";
|
||||
: "No selection";
|
||||
msg += " Selected";
|
||||
return RedirectToAction("IndexSuccess", new { message = msg });
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue