Register Page How-to

Topics: Business Logic Layer, Controls
Jun 9, 2009 at 6:29 PM

How do I expose the register page to users?  I would like for users to come and register on the blog so it pre populates thier email and name when they post comments.

 

Thanks

Jun 9, 2009 at 7:11 PM
Edited Jun 9, 2009 at 7:15 PM

just create a new register.aspx at the root.

using your VS, drag a CreateUserWizard control on to it.

Then,

Modify the register.aspx as below

<%@ Page Language="C#" AutoEventWireup="false" CodeFile="Register.aspx.cs" Inherits="register" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphBody" Runat="Server">

        <asp:CreateUserWizard ID="CreateUserWizard1" runat="server">
            <WizardSteps>
                <asp:CreateUserWizardStep runat="server">
                </asp:CreateUserWizardStep>
                <asp:CompleteWizardStep runat="server">
                </asp:CompleteWizardStep>
            </WizardSteps>
        </asp:CreateUserWizard>

</asp:Content>

 

Finally, modify register.aspx.cs as below

Partial Class register
    Inherits BlogEngine.Core.Web.Controls.BlogBasePage

 

End Class

 

I think there's a easier way, but this one works for me.

Dec 29, 2010 at 2:33 PM

Why not just use the registration page that is in the Accounts folder of BE 2.0 ?

 

Call from your default page or I think you can do it with the master page - if user LoggedIn = false then show registration page