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
595
1.9k
146.4k
ASP.NET Core Razor - post checkbox value as yes or no to database
Nov 14 2020 12:10 AM
I have the following checkbox
<input type=
"checkbox"
name=
"chk1"
asp-
for
=
"MinPPE.Head"
checked
data-toggle=
"toggle"
data-on=
"Not Required"
data-off=
"Required"
data-onstyle=
"danger"
data-offstyle=
"success"
data-width=
"150"
data-height=
"50"
/>
In the database, for MinPPE.Head I want to have Yes if checkbox checked (Required) and No if not (Not Required). How do I build my Post statement?
Reply
Answers (
6
)
ASP.Net MVC and sql server
Static Website Hosting with ASP.NET C# and AWS S3 problem