Skip to content

Instantly share code, notes, and snippets.

@gdyrrahitis
Last active February 24, 2018 13:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gdyrrahitis/55144635f89de59bfb2028f031686318 to your computer and use it in GitHub Desktop.
Save gdyrrahitis/55144635f89de59bfb2028f031686318 to your computer and use it in GitHub Desktop.
IsUrlValid
private static bool IsUrlValid(string returnUrl)
{
return !string.IsNullOrWhiteSpace(returnUrl)
&& Uri.IsWellFormedUriString(returnUrl, UriKind.Relative);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment