Click here to Skip to main content
16,008,075 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Encryption Pin
Ashley van Gerven23-Nov-06 9:48
Ashley van Gerven23-Nov-06 9:48 
GeneralRe: Encryption Pin
alexfromto23-Nov-06 10:10
alexfromto23-Nov-06 10:10 
QuestionNetwork Sniffer & Connection Analyzer Pin
hazarian23-Nov-06 6:05
hazarian23-Nov-06 6:05 
AnswerRe: Network Sniffer & Connection Analyzer Pin
Paul Conrad23-Nov-06 17:34
professionalPaul Conrad23-Nov-06 17:34 
QuestionRe: Network Sniffer & Connection Analyzer Pin
hazarian24-Nov-06 5:00
hazarian24-Nov-06 5:00 
QuestioncomboBox.SelectedItem/Index Pin
T0D023-Nov-06 3:50
T0D023-Nov-06 3:50 
AnswerRe: comboBox.SelectedItem/Index Pin
NutSoft23-Nov-06 5:21
NutSoft23-Nov-06 5:21 
GeneralRe: comboBox.SelectedItem/Index Pin
T0D023-Nov-06 5:47
T0D023-Nov-06 5:47 
Hi,
thanks for the reply.

Try chaning this code part, I get the the first Washington selected.
// Populates the list box using DataSource.
// DisplayMember is used to display just the long name of each state.
ArrayList USStates = new ArrayList();
USState defaultSelection = new USState("Washington", "W1"); //New
USStates.Add(new USState("Alabama", "AL"));
USStates.Add(new USState("Washington", "WA"));
USStates.Add(defaultSelection); // Duplicate DisplayMember //Changed
USStates.Add(new USState("West Virginia", "WV"));
USStates.Add(new USState("Wisconsin", "WI")); // Duplicate DisplayMember
USStates.Add(new USState("Wisconsin", "W1"));
USStates.Add(new USState("Wyoming", "WY"));

ListBox1.SelectedValueChanged += new EventHandler(ListBox1_SelectedValueChanged);
ListBox1.DataSource = USStates;
ListBox1.DisplayMember = "LongName";
ListBox1.ValueMember = "ShortName";

ListBox1.SelectedItem = defaultSelection; //New

Regards,

ToDo

GeneralRe: comboBox.SelectedItem/Index Pin
NutSoft23-Nov-06 23:05
NutSoft23-Nov-06 23:05 
QuestionData binding to multiple tables [modified] Pin
Wolfgang G. Schmidt23-Nov-06 3:11
Wolfgang G. Schmidt23-Nov-06 3:11 
AnswerRe: Data binding to multiple tables Pin
Paul Conrad26-Dec-06 17:05
professionalPaul Conrad26-Dec-06 17:05 
GeneralRe: Data binding to multiple tables Pin
Wolfgang G. Schmidt2-Jan-07 23:52
Wolfgang G. Schmidt2-Jan-07 23:52 
QuestionBatch File Pin
Tauseef A23-Nov-06 0:21
Tauseef A23-Nov-06 0:21 
AnswerRe: Batch File Pin
Luc Pattyn23-Nov-06 2:41
sitebuilderLuc Pattyn23-Nov-06 2:41 
QuestionVoice Over IP Pin
Ray Hayes23-Nov-06 0:14
Ray Hayes23-Nov-06 0:14 
AnswerRe: Voice Over IP Pin
~~~Johnny~~~23-Nov-06 15:41
~~~Johnny~~~23-Nov-06 15:41 
GeneralRe: Voice Over IP Pin
Ray Hayes23-Nov-06 23:16
Ray Hayes23-Nov-06 23:16 
QuestionShutdown and restart Pin
Tauseef A22-Nov-06 22:47
Tauseef A22-Nov-06 22:47 
AnswerRe: Shutdown and restart Pin
Bhupi Bhai22-Nov-06 23:53
Bhupi Bhai22-Nov-06 23:53 
QuestionRe: Shutdown and restart Pin
Tauseef A23-Nov-06 0:18
Tauseef A23-Nov-06 0:18 
AnswerRe: Shutdown and restart Pin
Thomas Stockwell23-Nov-06 15:12
professionalThomas Stockwell23-Nov-06 15:12 
QuestionNetwork Issue Pin
Tauseef A22-Nov-06 5:44
Tauseef A22-Nov-06 5:44 
AnswerRe: Network Issue Pin
Dave Kreskowiak22-Nov-06 6:29
mveDave Kreskowiak22-Nov-06 6:29 
QuestionRe: Network Issue Pin
Tauseef A22-Nov-06 8:11
Tauseef A22-Nov-06 8:11 
AnswerRe: Network Issue Pin
Dave Kreskowiak22-Nov-06 8:23
mveDave Kreskowiak22-Nov-06 8:23 

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.