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
590
1.9k
149k
ASP.NET Core EF set @html as input source
May 17 2020 10:51 AM
I don't understand why the table adds only one value and it doesn't add the second one. For the HazardClass is working fine but for HazardDetails is not
Update. It seems that the problem I have is with:
<div
class
=
"form-control"
>
@Html.DisplayFor(model => model.HazardClass.IdHC)
</div>
which also should be source for input
var emptyHaz =
new
HazardDetail();
if
(await TryUpdateModelAsync<HazardDetail>(emptyHaz,
"hazardDetail"
, s => s.IdHC, s => s.HazDetail))
{
_context.HazardDetails.Add(emptyHaz);
await _context.SaveChangesAsync();
return
RedirectToPage(
"./Index"
);
}
So, the question is, how do I get the @html..... to be input for IdHC?
Reply
Answers (
5
)
I want the output of this code
Google MAP API JAVASCRIPT