Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace UnpremierBetting.Utilities
- {
- using System;
- using System.Globalization;
- using System.Web.Mvc;
- public static class HtmlExtensions
- {
- public static MvcHtmlString DisplayPrice(this HtmlHelper helper, decimal price)
- {
- var format = new NumberFormatInfo() {NumberGroupSeparator = " "};
- string formatedPrice = price.ToString("N0", format);
- return new MvcHtmlString($"£{formatedPrice}");
- }
- public static MvcHtmlString MatchDate(this HtmlHelper helper, DateTime matchDate, string tag)
- {
- var h3 = new TagBuilder(tag);
- string matchDay = matchDate.ToString("D");
- h3.InnerHtml = matchDay;
- return new MvcHtmlString(h3.ToString());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement