Export (0) Print
Expand All

Login.CreateUserUrl Property

Note: This property is new in the .NET Framework version 2.0.

Gets or sets the URL of the new-user registration page.

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)

public virtual string CreateUserUrl { get; set; }
/** @property */
public String get_CreateUserUrl ()

/** @property */
public void set_CreateUserUrl (String value)

public function get CreateUserUrl () : String

public function set CreateUserUrl (value : String)

Property Value

The URL of the new-user registration page. The default is Empty.

The CreateUserUrl property contains the URL of the new-user registration page for the Web site. The CreateUserText property contains the text used for the link.

If the CreateUserText property is empty, the link to the registration page is unavailable to the user.

The following code example sets the CreateUserUrl property to "register.aspx".

<%@ Page Language="C#" AutoEventWireup="False" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<SCRIPT runat="server">
        void changeText_Click(Object sender, EventArgs e)
        {
            Login1.CreateUserText = Server.HtmlEncode(createText.Text);
        }

</SCRIPT>
<HTML>
    <BODY>
        <FORM runat="server">
            <table>
                <tr>
                    <td>
                        Create User Text:
                    </td>
                    <td>
                        <asp:TextBox id="createText" runat="server" Text="Create user..." />
                    </td>
                    <td>
                        <asp:Button id="changeText" runat="server" Text="Change Text" OnClick="changeText_Click" />
                    </td>
                </tr>
                <tr>
                    <td colspan="3" align="center">
                        <asp:Login id="Login1" runat="server" 
                            CreateUserText="Register new user..." 
                            CreateUserUrl="register.aspx">
                        </asp:Login>
                    </td>
                </tr>
            </table>
        </FORM>
    </BODY>
</HTML>

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show:
© 2014 Microsoft