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
r k
NA
111
16.6k
HTML Multi Select Options
Apr 13 2021 9:35 PM
I have this multiselect dropdown
<select id="ddlCustomers" class=" form-control input-sm selectType country" name="ddlDtype" multiple="multiple" size="7" >
when user selects multiple options Example 2,3,4
Then I am saving like this
var countries = [];
$.each($(".country option:selected"), function(){
countries.push($(this).val());
});
and save to DB
with var country= countries.join(", ");
Now when a user comes & edits these multi-select saved values I want these pre-saved options 2,3,4 should be selected & rest in the list to be unselected so that the user can modify its choice & can select any other items from the option
For saving, I have bootstrap modal pop with this HTMLselect option & other controls. after save they appear in a grid view, in grid view on each row id user can edit the select options in another modal pop and saves edited values in DB.
Please help
Reply
Answers (
2
)
Unsupported Media Type Error [FormBody] ASP.NET Core 3.1 JSON
FileUpload control loses the attactment on every mail send postback.