-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated Views/Tenant/Index to have a form, the name=searchQuery match…
…es the parameter name in the TenantController's Index action (string searchQuery). When the owner types in the search field and submits the form, the browser sends the GET method request with th input value appended as a query string, like this: /Tenant/Index?searchQuery=example. Then, the TenantController receices the value of searchQuery from the queryString, if searchQuery is not null/empty, the code: tenants = tenants.Where(t => t.email.Contains(searchQuery)); filters the list of tenants to include only those whose Email contains the value of searchQery. Next, the filtered list of tenants is converted to a List and passed to the view: return View(tenants.ToList());. Finally, the view displays the results dynamically using the filtered data.
- Loading branch information
Showing
10 changed files
with
93 additions
and
63 deletions.
There are no files selected for viewing
Binary file removed
BIN
-1.84 MB
.vs/prjRentalManagement/FileContentIndex/92c6f663-dfaf-4334-af51-cf7c52741668.vsidx
Binary file not shown.
Binary file added
BIN
+1.84 MB
.vs/prjRentalManagement/FileContentIndex/ebc17b62-cc28-4f28-892e-1d6879e54eb6.vsidx
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,4 +33,3 @@ textarea { | |
background-color: #c82333; | ||
border-color: #bd2130; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.