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

1.6 KiB

title author description manager ms.author ms.date ms.prod ms.technology ms.topic uid
Adding Search rick-anderson Shows how to add search to simple ASP.NET Core MVC app wpickett riande 03/07/2017 asp.net-core aspnet get-started-article 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