Multiselect ddl and textbox.
1)whenever i am selecting ddl item and put email in text box for each item manually . i want to add ',' before second email id put in text box.
2) if i am unselecting perticular item form ddl that time regarding textbox email is remove from textbox.
3) i have Email3 and Email4 hardcoded text.
function GetSelectedValue() {
debugger;
var SelectedITem = $(".selectpicker option:selected").text();
// var strUser = SelectedITem.options[SelectedITem.selectedIndex].text();
if (SelectedITem == 'Email3' || SelectedITem == 'Email4') {
txtEmailID.value = "[email protected]";
}
else {
txtEmailID.value = "";
}
}
Jayraj ChhayaPosted Feb 23, 2024, 6:43 AM
Hi Amit,
To achieve the desired functionalities, you can use JavaScript/jQuery along with ASP.NET code-behind. Here's how you can implement the required logic:
Adding a comma before the second email address:
onkeyupevent to the textbox to detect when the user enters a comma (',').GetSelectedValuefunction to handle the removal of email addresses.