AspNetCore.Docs/aspnetcore/tutorials/first-mvc-app/search.md

1.6 KiB

title author description keywords ms.author manager ms.date ms.topic ms.assetid ms.technology ms.prod uid
Adding Search rick-anderson Shows how to add search to simple ASP.NET Core MVC app ASP.NET Core, riande wpickett 03/07/2017 get-started-article d69e5529-8ef6-4628-855d-200206d962b9 aspnet asp.net-core tutorials/first-mvc-app/search

[!INCLUDEadding-model]

You can quickly rename the searchString parameter to id with the rename command. Right click on searchString > Rename.

Contextual menu

The rename targets are highlighted.

Code editor showing the variable highlighted throughout the Index ActionResult method

Change the parameter to id and all occurrences of searchString change to id.

Code editor showing the variable has been changed to id

[!INCLUDEadding-model]

Notice how intelliSense helps us update the markup.

Intellisense contextual menu with method selected in the list of attributes for the form element

Intellisense contextual menu with get selected in the list of method attribute values

Notice the distinctive font in the <form> tag. That distinctive font indicates the tag is supported by Tag Helpers.

form tag with purple text

[!INCLUDEadding-model]

[!div class="step-by-step"] Previous Next