locked
If else statement RRS feed

  • Question

  • Hi,

    I have written the following if else statement. But either the AonSite is Aon or NonAon I am getting the same result which is Policy_Ace.xsl. I wanted if Aonsite = Aon then Policy_Aon.xsl to be displayed, if not Policy_Ace to be displayed.

     else if ((docType == enuDocument.Policy) || (docType == enuDocument.Renewal) || (docType == enuDocument.Endorsement) || (docType == enuDocument.PolicyAgreed))//SCR230615-01 change
                    {
                        if (MyProposal.AonSite == "Aon")
                        {
                            p.AddPDFSection(strXml, Server.MapPath(versionPath + "Policy_Aon.xsl"), false);
                        }
                        else
                        {
                            p.AddPDFSection(strXml, Server.MapPath(versionPath + "Policy_Ace.xsl"), false);
                        }
                    }


    Durga

    Thursday, April 14, 2016 7:04 AM

Answers

  • I'd try over here.

    http://forums.asp.net/37.aspx/1?C+

     

     

     


    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server]

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

    • Proposed as answer by Mike Laughlin Thursday, April 14, 2016 12:51 PM
    • Marked as answer by Just Karl Saturday, April 23, 2016 2:46 PM
    Thursday, April 14, 2016 12:43 PM