Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Linq;
- using System.Web;
- using System.Text.RegularExpressions;
- namespace NewsWebSite.Models
- {
- public class UrlHelper
- {
- public static void validateURL(Article a)
- {
- string input = a.Title;
- a.Url = Regex.Replace(input, @"[\W \s]+", "-");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement