Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
Lesson49
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Пасько Виталий
Lesson49
Commits
63f9d8b4
Commit
63f9d8b4
authored
Jun 23, 2022
by
TTrueBenji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Добавил удаление посредством селекта.
parent
757c2b89
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
Index.cshtml
PhoneStore/Views/Phones/Index.cshtml
+10
-1
No files found.
PhoneStore/Views/Phones/Index.cshtml
View file @
63f9d8b4
...
...
@@ -6,7 +6,6 @@
}
<a asp-action="Create" asp-controller="Phones">Добавить устройство</a>
@* https://localhost:5001/Phone/Create method GET*@
@if (Model.Count == 0)
{
<h2>Список пуст.</h2>
...
...
@@ -57,5 +56,15 @@ else
</tr>
}
</table>
<form asp-action="Delete" asp-controller="Phones" method="get">
<select name="phoneId" id="">
@foreach (var phone in Model)
{
<option value="@phone.Id">@phone.Name</option>
}
</select>
<button type="submit">delete</button>
</form>
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment