Thursday, 4 July 2013

switch case

public string setpagevalue(string pagename)
    {
        string valdata = pagename;
        switch(valdata){
            case "ASP.formshome_aspx": return "Home Page"; break;
            case "ASP.admin_aspx": return "Administration Page";break;
            case "ASP.import_data_aspx": return "Import Data Page"; break;
            case "ASP.report_aspx": return "Report Page"; break;
            case "ASP.vfamemberprofile_aspx": return "VFA Member Profile"; break;
         
             //default
            default: return string.Empty;
                break;      
        }
    } 

No comments:

Post a Comment

How to highlight selected text in notepad++

  –> To highlight a block of code in Notepad++, please do the following steps step-1  :- Select the required text. step-2  :- Right click...