Click here to Skip to main content
15,890,825 members
Home / Discussions / C#
   

C#

 
GeneralRe: Disaplying different panels from options in a dropdown list Pin
AdamskiR11-Oct-05 5:32
AdamskiR11-Oct-05 5:32 
GeneralRe: Disaplying different panels from options in a dropdown list Pin
XRaheemX11-Oct-05 5:37
XRaheemX11-Oct-05 5:37 
GeneralRe: Disaplying different panels from options in a dropdown list Pin
XRaheemX11-Oct-05 5:38
XRaheemX11-Oct-05 5:38 
GeneralRe: Disaplying different panels from options in a dropdown list Pin
AdamskiR11-Oct-05 6:03
AdamskiR11-Oct-05 6:03 
GeneralRe: Disaplying different panels from options in a dropdown list Pin
XRaheemX11-Oct-05 7:08
XRaheemX11-Oct-05 7:08 
GeneralRe: Disaplying different panels from options in a dropdown list Pin
XRaheemX11-Oct-05 7:37
XRaheemX11-Oct-05 7:37 
GeneralRe: Disaplying different panels from options in a dropdown list Pin
AdamskiR11-Oct-05 22:55
AdamskiR11-Oct-05 22:55 
GeneralRe: Disaplying different panels from options in a dropdown list Pin
XRaheemX12-Oct-05 3:52
XRaheemX12-Oct-05 3:52 
omg I'm so sorry... my mind was in VB.NET when I wrote this. (VB uses the keywork SELECT instead of SWITCH that is used in C#"

<code>
private void Speciality_SelectedIndexChanged(object sender, System.EventArgs e)
{
    switch(Speciality.SelectedItem.Value.ToLower())
    {
        case "breast surgery":
           SpecialityBreastSurgery.Visible = true;
           break;

        case "cardiology":
	   SpecialityCardiology.Visible = true;
           break;

	default: //In case you want to do something "else"
        break;
    }
}
</code>


Also remember that your strings for your CASE statements MUST be all lowercase in this instance because I used a .ToLower() in the switch. (I have a habit of doing this to remove casing errors). If you want to use exact case, just simply remove the .ToLower() from the switch.
QuestionButton Event Handler Pin
Brendan Vogt11-Oct-05 3:27
Brendan Vogt11-Oct-05 3:27 
AnswerRe: Button Event Handler Pin
XRaheemX11-Oct-05 3:40
XRaheemX11-Oct-05 3:40 
GeneralRe: Button Event Handler Pin
Brendan Vogt11-Oct-05 4:34
Brendan Vogt11-Oct-05 4:34 
GeneralRe: Button Event Handler Pin
XRaheemX11-Oct-05 4:47
XRaheemX11-Oct-05 4:47 
QuestionWait in loop Pin
mrnoname11-Oct-05 3:16
mrnoname11-Oct-05 3:16 
AnswerRe: Wait in loop Pin
XRaheemX11-Oct-05 3:29
XRaheemX11-Oct-05 3:29 
GeneralRe: Wait in loop Pin
S. Senthil Kumar11-Oct-05 4:20
S. Senthil Kumar11-Oct-05 4:20 
GeneralRe: Wait in loop Pin
XRaheemX11-Oct-05 4:39
XRaheemX11-Oct-05 4:39 
GeneralRe: Wait in loop Pin
mrnoname11-Oct-05 9:25
mrnoname11-Oct-05 9:25 
AnswerRe: Wait in loop Pin
Wjousts11-Oct-05 4:22
Wjousts11-Oct-05 4:22 
GeneralRe: Wait in loop Pin
XRaheemX11-Oct-05 4:42
XRaheemX11-Oct-05 4:42 
GeneralRe: Wait in loop Pin
Wjousts11-Oct-05 6:46
Wjousts11-Oct-05 6:46 
GeneralRe: Wait in loop Pin
XRaheemX11-Oct-05 7:10
XRaheemX11-Oct-05 7:10 
QuestionVB.NET IRR Function Pin
zaboboa11-Oct-05 3:04
zaboboa11-Oct-05 3:04 
AnswerRe: VB.NET IRR Function Pin
Dave Kreskowiak11-Oct-05 5:38
mveDave Kreskowiak11-Oct-05 5:38 
GeneralRe: VB.NET IRR Function Pin
zaboboa11-Oct-05 9:45
zaboboa11-Oct-05 9:45 
QuestionWindows Service Pin
Talktorajeev11-Oct-05 2:20
Talktorajeev11-Oct-05 2:20 

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.