Click here to Skip to main content
15,902,938 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Multiple Items Selection from a dropdown Pin
N a v a n e e t h25-May-07 0:16
N a v a n e e t h25-May-07 0:16 
GeneralRe: Multiple Items Selection from a dropdown Pin
Paddy Boyd25-May-07 0:22
Paddy Boyd25-May-07 0:22 
GeneralRe: Multiple Items Selection from a dropdown Pin
rameshbhojan25-May-07 0:30
rameshbhojan25-May-07 0:30 
GeneralRe: Multiple Items Selection from a dropdown Pin
rameshbhojan25-May-07 0:29
rameshbhojan25-May-07 0:29 
GeneralRe: Multiple Items Selection from a dropdown Pin
Chetan Ranpariya25-May-07 1:44
Chetan Ranpariya25-May-07 1:44 
GeneralRe: Multiple Items Selection from a dropdown Pin
rameshbhojan26-May-07 8:34
rameshbhojan26-May-07 8:34 
GeneralRe: Multiple Items Selection from a dropdown Pin
rameshbhojan27-May-07 17:35
rameshbhojan27-May-07 17:35 
GeneralRe: Multiple Items Selection from a dropdown Pin
Chetan Ranpariya27-May-07 19:18
Chetan Ranpariya27-May-07 19:18 
Hi,

There is no such property which you can set get your required functionality.
But you can apply your logic in code behind or in javascript to check how many items are selected.
In code behind you can use GetSelectedIndices() of listbox which will return an array of all the indices of selected items in the listbox.

you can check for the length of that array if it is less than 3.
int[] selectedindices = lstBox.GetSelectedIndices();
string strSelected = "";
if(selectedindices.Length<=3)
{
foreach(int i in selectedindices)
{
strSelected += lstBox.Items[i].Value + ",";
}
}

use strSelected in the Insert query.

I hope this will help you.

Thanks and Regards,
Chetan Ranpariya

GeneralRe: Multiple Items Selection from a dropdown Pin
rameshbhojan27-May-07 23:57
rameshbhojan27-May-07 23:57 
GeneralRe: Multiple Items Selection from a dropdown Pin
Chetan Ranpariya28-May-07 0:02
Chetan Ranpariya28-May-07 0:02 
GeneralRe: Multiple Items Selection from a dropdown Pin
rameshbhojan28-May-07 17:19
rameshbhojan28-May-07 17:19 
GeneralRe: Multiple Items Selection from a dropdown Pin
rameshbhojan28-May-07 18:24
rameshbhojan28-May-07 18:24 
GeneralRe: Multiple Items Selection from a dropdown Pin
Chetan Ranpariya28-May-07 20:05
Chetan Ranpariya28-May-07 20:05 
GeneralRe: Multiple Items Selection from a dropdown Pin
rameshbhojan29-May-07 2:08
rameshbhojan29-May-07 2:08 
GeneralRe: Multiple Items Selection from a dropdown Pin
rameshbhojan4-Jun-07 17:53
rameshbhojan4-Jun-07 17:53 
GeneralRe: Multiple Items Selection from a dropdown Pin
Chetan Ranpariya4-Jun-07 19:52
Chetan Ranpariya4-Jun-07 19:52 
AnswerRe: Multiple Items Selection from a dropdown Pin
Tarakeshwar Reddy25-May-07 3:18
professionalTarakeshwar Reddy25-May-07 3:18 
QuestionWeb.config Pin
Glenn D'souza24-May-07 20:48
Glenn D'souza24-May-07 20:48 
QuestionMost secure way to submit hidden fields? Pin
InvalidTypecast24-May-07 20:44
InvalidTypecast24-May-07 20:44 
AnswerRe: Most secure way to submit hidden fields? Pin
N a v a n e e t h24-May-07 20:55
N a v a n e e t h24-May-07 20:55 
GeneralRe: Most secure way to submit hidden fields? Pin
Guffa24-May-07 23:01
Guffa24-May-07 23:01 
GeneralRe: Most secure way to submit hidden fields? Pin
N a v a n e e t h24-May-07 23:55
N a v a n e e t h24-May-07 23:55 
AnswerRe: Most secure way to submit hidden fields? Pin
Guffa25-May-07 0:08
Guffa25-May-07 0:08 
GeneralRe: Most secure way to submit hidden fields? Pin
N a v a n e e t h25-May-07 0:23
N a v a n e e t h25-May-07 0:23 
AnswerRe: Most secure way to submit hidden fields? Pin
Guffa25-May-07 2:35
Guffa25-May-07 2:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.