Skip to content

Commit 9e62c03

Browse files
Merge branch 'live' into master
2 parents 0306fec + c19e388 commit 9e62c03

3 files changed

Lines changed: 17 additions & 8 deletions

File tree

aspnetcore/mvc/views/working-with-forms.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ The *Views/Shared/EditorTemplates/CountryViewModel.cshtml* template:
636636

637637
Adding HTML [\<option>](https://www.w3.org/wiki/HTML/Elements/option) elements isn't limited to the *No selection* case. For example, the following view and action method will generate HTML similar to the code above:
638638

639-
[!code-csharp[](working-with-forms/sample/final/Controllers/HomeController.cs?range=114-119)]
639+
[!code-csharp[](working-with-forms/sample/final/Controllers/HomeController.cs?name=snippetNone)]
640640

641641
[!code-HTML[](working-with-forms/sample/final/Views/Home/IndexOption.cshtml)]
642642

aspnetcore/mvc/views/working-with-forms/sample/final/Controllers/HomeController.cs

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using FormsTagHelper.ViewModels;
1+
using FormsTagHelper.ViewModels;
22
using Microsoft.AspNetCore.Mvc;
33

44
namespace FormsTagHelper.Controllers
@@ -18,8 +18,8 @@ public IActionResult Index(CountryViewModel model)
1818
{
1919
if (ModelState.IsValid)
2020
{
21-
var msg = model.Country + " selected";
22-
return RedirectToAction("IndexSuccess", new { message = msg});
21+
var msg = model.Country + " selected";
22+
return RedirectToAction("IndexSuccess", new { message = msg });
2323
}
2424

2525
// If we got this far, something failed; redisplay form.
@@ -38,7 +38,7 @@ public IActionResult IndexMultiSelect(CountryViewModelIEnumerable model)
3838
{
3939
if (ModelState.IsValid)
4040
{
41-
string strCountriesSelected="";
41+
string strCountriesSelected = "";
4242
foreach (string s in model.CountryCodes)
4343
{
4444
strCountriesSelected = strCountriesSelected + " " + s;
@@ -63,7 +63,7 @@ public IActionResult IndexGroup(CountryViewModelGroup model)
6363
if (ModelState.IsValid)
6464
{
6565
var msg = model.Country + " selected";
66-
return RedirectToAction("IndexSuccess", new { message = msg});
66+
return RedirectToAction("IndexSuccess", new { message = msg });
6767
}
6868

6969
return View(model);
@@ -83,7 +83,7 @@ public IActionResult IndexEnum(CountryEnumViewModel model)
8383
if (ModelState.IsValid)
8484
{
8585
var msg = model.EnumCountry + " selected";
86-
return RedirectToAction("IndexSuccess", new { message = msg});
86+
return RedirectToAction("IndexSuccess", new { message = msg });
8787
}
8888

8989
return View(model);
@@ -128,5 +128,13 @@ public IActionResult IndexSuccess(string message)
128128
ViewData["Message"] = message;
129129
return View();
130130
}
131+
#region snippetNone
132+
public IActionResult IndexNone()
133+
{
134+
var model = new CountryViewModel();
135+
model.Insert(0, new SelectListItem("<none>", ""));
136+
return View(model);
137+
}
138+
# endregion
131139
}
132140
}

aspnetcore/security/samesite.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ description: Learn how to use to SameSite cookies in ASP.NET Core
55
ms.author: riande
66
ms.custom: mvc
77
ms.date: 12/03/2019
8-
no-loc: [Blazor, "Identity", "Let's Encrypt", Razor, SignalR]
8+
no-loc: [Blazor, "Identity", "Let's Encrypt", Razor, SignalR, Electron]
9+
910
uid: security/samesite
1011
---
1112
# Work with SameSite cookies in ASP.NET Core

0 commit comments

Comments
 (0)