Quick Redirect To SSL ASP.NET

Here is a quick example for how you can redirect a user on a asp.net page to a secured version.

[code lang=”csharp”]
if (!Request.IsSecureConnection)
{
Response.Redirect(“https” + Request.Url.AbsoluteUri.Substring(4), true);
}
[/code]