Advertisement
Guest User

Untitled

a guest
Feb 12th, 2017
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ASP 0.32 KB | None | 0 0
  1. using System.Linq;
  2. using System.Web;
  3. using System.Text.RegularExpressions;
  4.  
  5. namespace NewsWebSite.Models
  6. {
  7.     public class UrlHelper
  8.     {
  9.         public static void validateURL(Article a)
  10.         {
  11.             string input = a.Title;
  12.             a.Url = Regex.Replace(input, @"[\W \s]+", "-");
  13.         }
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement