You must Sign In to post a response.
Category: .NET
#767600
Hi,
You can use ListBox control. In that you can add and select multiple values as you want.
You can use ListBox control. In that you can add and select multiple values as you want.
<asp:ListBox ID="rightListBox" runat="server">
<asp:ListItem Text="user1" Value="U1"></asp:ListItem>
<asp:ListItem Text="user2" Value="U2"></asp:ListItem>
</asp:ListBox>
#767608
Hi,
What you are expecting from our end, you want to know which control to be used in this scenario or you want to know how to make code for multi selection.
If you want to know which control to be used, In that case Sashi answer may help you, but if you want to know how to make code for multiselection I suggest you to refer below sample code.
Hope this helps you....
--------------------------------------------------------------------------------
Give respect to your work, Instead of trying to impress your boss.
N@veen
Blog : http://naveens-dotnet.blogspot.in/
What you are expecting from our end, you want to know which control to be used in this scenario or you want to know how to make code for multi selection.
If you want to know which control to be used, In that case Sashi answer may help you, but if you want to know how to make code for multiselection I suggest you to refer below sample code.
foreach (ListItem item in ListBox1.Items)
{
if (item.Selected)
{
// your action...
}
}
Hope this helps you....
--------------------------------------------------------------------------------
Give respect to your work, Instead of trying to impress your boss.
N@veen
Blog : http://naveens-dotnet.blogspot.in/
#767697
Hai Muraleedharan,
You can use the ListBox with MultiSelect as true which will enable the multiple selection in the Listbox in Windows applications.
Hope it will be helpful to you.
Regards,
Pawan Awasthi(DNS MVM)
+91 8123489140 (whatsApp), +60 14365 1476(Malaysia)
pawansoftit@gmail.com
You can use the ListBox with MultiSelect as true which will enable the multiple selection in the Listbox in Windows applications.
Hope it will be helpful to you.
Regards,
Pawan Awasthi(DNS MVM)
+91 8123489140 (whatsApp), +60 14365 1476(Malaysia)
pawansoftit@gmail.com
#767699
hi
try this
Name : Dotnet Developer-2015
Email Id : kumaraspcode2009@gmail.com
'Not by might nor by power, but by my Spirit,' says the LORD Almighty.
try this
listBox1.Items.Add("One");
listBox1.Items.Add("Two");
listBox1.Items.Add("Three");
listBox1.SelectionMode = SelectionMode.MultiSimple;
Name : Dotnet Developer-2015
Email Id : kumaraspcode2009@gmail.com
'Not by might nor by power, but by my Spirit,' says the LORD Almighty.
Return to Return to Discussion Forum