Share via


CreateUserWizard.ContinueDestinationPageUrl 属性

定义

获取或设置在用户单击成功页上的“继续”按钮后将看到的页的 URL

public:
 virtual property System::String ^ ContinueDestinationPageUrl { System::String ^ get(); void set(System::String ^ value); };
[System.Web.UI.Themeable(false)]
public virtual string ContinueDestinationPageUrl { get; set; }
[<System.Web.UI.Themeable(false)>]
member this.ContinueDestinationPageUrl : string with get, set
Public Overridable Property ContinueDestinationPageUrl As String

属性值

目标页的 URL。 默认值为 Empty

属性

示例

下面的代码示例使用 ContinueDestinationPageUrl 属性将用户返回到用户在访问注册页之前正在查看的页面。

<%@ page language="C#"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
    void Page_Load(object sender, EventArgs e)
    {
        if (!(Session["CreateUserReferrerUrl"] is String))
        {
            Session["CreateUserReferrerUrl"] = Request.UrlReferrer.ToString ();
        }

        CreateUserWizard1.ContinueDestinationPageUrl =
            (string)Session["CreateUserReferrerUrl"];
    }
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:createuserwizard id="CreateUserWizard1" runat="server">
        </asp:createuserwizard>
    </div>
    </form>
</body>
</html>
<%@ page language="VB"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
    Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)

        If Not Session("CreateUserReferrerUrl") Is Nothing Then
            Session("CreateUserReferrerUrl") = Request.UrlReferrer.ToString()
        End If
        CreateUserWizard1.ContinueDestinationPageUrl = _
            CStr(Session("CreateUserReferrerUrl"))
    End Sub
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:createuserwizard id="CreateUserWizard1" runat="server">
        </asp:createuserwizard>
    </div>
    </form>
</body>
</html>

注解

属性 ContinueDestinationPageUrl 包含用户在成功完成网站注册后将看到的网页的 URL。 通过设置 ContinueDestinationPageUrl 属性,可以控制新注册用户看到的第一页。

ContinueDestinationPageUrl当 属性为 Empty 并且用户单击“继续”按钮时,将刷新页面并清除窗体上的任何值。

无法通过主题或样式表主题设置此属性。 有关详细信息,请参阅 ThemeableAttributeASP.NET 主题和皮肤

适用于

另请参阅