15,922,894 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Visual Basic questions
View Javascript questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 12835902 (Top 4 by date)
Member 12835902
11-Nov-16 15:26pm
View
If I add a breakpoint on
IEnumerable<int> selectedDevices = vmEdit.Devices.Where(x => x.IsChecked).Select(x => x.ID);
for the [HttpPost] Edit Action Method then all of the values that I select to enter for the first time are correct and they get added to the database fine.
If I then try to update the DevId values based on the CustId 1006 and set a breakpoint on
IEnumerable<int> selectedDevices = vmEdit.Devices.Where(x => x.IsChecked).Select(x => x.ID);
for the [HttpPost] Edit Action Method and then choose to remove the Keyboard which is value 1 in the database and then click submit it actually keeps Keyboard and remove's DevId values 3, 4 and 7.
Member 12835902
10-Nov-16 14:23pm
View
Hi P_Z,
I updated my original post and added the view source for "Edit View (Source Code) that shows CheckBoxList Values:" and "Edit View (Source Code) that shows CheckBoxList Values assigned to CustId 1006:". Please let me know if you need anything else. I appreciate your help with this post. I'm truly stuck!! I'm also submitting the values using a submit button, no Ajax is being used.
Member 12835902
10-Nov-16 14:09pm
View
Deleted
Hi P_Z,
I hope I understood correctly what you are asking for. Please see the following below:
This is the ViewSource Code when I initially load the CheckBoxList Items.
<!DOCTYPE html>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Edit Device(s) to Customer - WebForm
Toggle navigation
WebForm
Home
Customer
Customer Device
Contact
Edit Device(s) to Customer
Please select the Devices to assign to
Mary Doe
Desktop
Laptop
Keyboard
Mouse
Headset
iPad
Power Adapter
Phone
Submit
© 2016 - WebForm
<!-- Visual Studio Browser Link -->
{"requestId":"359eef69ee5348909cbbb8b0835fbb27","requestMappingFromServer":false}
<!-- End Browser Link -->
I'm posting the values back using a submit button.
Member 12835902
10-Nov-16 10:09am
View
Hi P_Z,
I looked at the article that you sent me, it makes sense but not sure how or were to implement that in my code. Is there anyway you could help me? I hate asking for help, but I have searched Google and have tried numerous things to no prevail :(