@{
    Layout = "~/_SiteLayout.cshtml";
    Page.Title = "Registration Confirmation Page";

    string message = "";
    var confirmationToken = Request["confirmationCode"];

    WebSecurity.Logout();
    if (!confirmationToken.IsEmpty()) {
        if (WebSecurity.ConfirmAccount(confirmationToken)) {
            message = "Registration Confirmed! Click on the log in tab to log in to the site.";
        } else {
            message = "Could not confirm your registration info.";
        }
    }
}

<hgroup class="title">
    <h1>@Page.Title.</h1>
    <h2>Use the form below to confirm your account.</h2>
</hgroup>

@if (!message.IsEmpty()) {
    <p>@message</p>
} else {
    <form method="post">
        <fieldset>
            <legend>Confirmation Code</legend>
            <ol>
                <li>
                    <label for="confirmationCode">Confirmation code</label>
                    <input type="text" id="confirmationCode" name="confirmationCode" />
                </li>
            </ol>
            <input type="submit" value="Confirm" />
        </fieldset>
    </form>
}