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 主題和麵板

適用於

另請參閱