Last active
December 14, 2015 23:19
-
-
Save JasonOffutt/5165305 to your computer and use it in GitHub Desktop.
Emitting values in HTML...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h3 class="header-text" >Confirm your Contribution: </h3> | |
<p><b><asp:Literal ID="lName" runat="server" /></b>, thank you for your generosity! You are about to give a gift totalling <b><asp:Literal ID="lTotal" runat="server"/></b> to the following funds:</p> | |
<asp:Repeater ID="rptGifts" runat="server"> | |
<HeaderTemplate> | |
<ul> | |
</HeaderTemplate> | |
<ItemTemplate> | |
<li><%# Eval("Amount").ToString("C") %> to the <%# Eval("Fund") %>.</li> | |
</ItemTemplate> | |
<FooterTemplate> | |
</ul> | |
</FooterTemplate> | |
</asp:Repeater> | |
<p>Your gift will be paid using your <b><asp:Literal ID="lCardType" runat="server"/></b> credit card ending in <b><asp:Literal ID="lLastFour" runat="server"/></b>.</p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected void btnNext_Click( object sender, EventArgs e ) | |
{ | |
var firstTrans = _transactions.First(); | |
lName.Text = person.FullName; | |
lTotal.Text = _transactions.Sum( t => t.Amount ).ToString("C"); | |
lCardType.Text = firstTrans.CardType; | |
lLastFour.Text = firstTrans.CardNumber.Substring( firstTrans.CardNumber.length - 4 ); | |
rptGifts.DataSource = _transactions; | |
rptGifts.DataBind(); | |
pnlDetails.Visible = false; | |
pnlConfirmation.Visible = true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment