TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Marius Vasile
592
1.9k
145.3k
asp.net core Razor pages @Html.DropDownListFor selected value as Input
Nov 23 2020 10:48 PM
How do I use the selected value from @Html.DropDownListFor for OnPost input value?
@Html.DropDownListFor(x => Model.HazardsListEdit.SelectedHazClassId,
new
SelectList(Model.HazardsListEdit.HazardsClasses,
"Value"
,
"Text"
),
htmlAttributes:
new
{ @
class
=
"form-control"
, id =
"HazClass"
, @required =
true
})
<input hidden asp-
for
=
"HazId.HazClass"
value=
" "
/>
Reply
Answers (
8
)
error : ; expected in a line that is deleted from class file
asp.net core razor show div if model has data