public void RenderCreditCardOnFile(AccountCreditCardType creditCardType)
    {
        if (IsCreditCardOnFileValid(creditCardType))
        {
            StringBuilder html = new StringBuilder();

            var creditCardOnFile = CreditCardsOnFile.Where(c => c.CreditCardType == creditCardType).FirstOrDefault();

            html.Append(@"
                <tr>
                    <td class='options'>
                        <a href=""" + Page.ClientScript.GetPostBackClientHyperlink(this, "UseCard|" + creditCardType.ToString()) + @""" class='btn btn-success Next'>
                            " + string.Format(Resources.Shopping.UseMy_Card, creditCardType.ToString().ToLower()) + @"</a>
                    </td>
                    <td class='description'>
                        <span class='producttitle'>"
                              + Resources.Shopping.CreditDebitEndingIn + " " + creditCardOnFile.CreditCardNumberDisplay.Replace("*", "") + @"</span>
                    </td>
                    <td class='nameoncard'>
                        " + creditCardOnFile.NameOnCard + @"
                    </td>
                    <td class='expirationdate'>
                        " + creditCardOnFile.ExpirationDate.ToString("M/yyyy") + @"
                    </td>
                </tr>
            ");


            HtmlTextWriter writer = new HtmlTextWriter(Response.Output);
            writer.Write(html.ToString());
        }
    }
    public void RenderCreditCardOnFile(AccountCreditCardType creditCardType)
    {
        string displayCardTypeToExigoButton = "";

        if (IsCreditCardOnFileValid(creditCardType))
        {
            StringBuilder html = new StringBuilder();

            var creditCardOnFile = CreditCardsOnFile.Where(c => c.CreditCardType == creditCardType).FirstOrDefault();

            //Check which card type the credit card is and display it on the exigo button.
            if (creditCardType.Equals(AccountCreditCardType.Primary))
            {
                displayCardTypeToExigoButton = Resources.Shopping.UsePrimaryCard;
            }
            else if(creditCardType.Equals(AccountCreditCardType.Secondary))
            {
                displayCardTypeToExigoButton = Resources.Shopping.UseSecondaryCard;
            }

            html.Append(@"
                <tr>
                    <td class='options'>
                        <a href=""" + Page.ClientScript.GetPostBackClientHyperlink(this, "UseCard|" + creditCardType.ToString()) + @""" class='btn btn-success'>"+displayCardTypeToExigoButton+@"</a>
                    </td>
                    <td class='description'>
                        <span class='producttitle'>
                            " + Resources.Shopping.CreditDebitEndingIn + " " + creditCardOnFile.CreditCardNumberDisplay.Replace("*", "") + @"</span>
                    </td>
                    <td class='nameoncard'>
                        " + creditCardOnFile.NameOnCard + @"
                    </td>
                    <td class='expirationdate'>
                        " + creditCardOnFile.ExpirationDate.ToString("M/yyyy") + @"
                    </td>
                </tr>
            ");


            HtmlTextWriter writer = new HtmlTextWriter(Response.Output);
            writer.Write(html.ToString());
        }
    }