Udostępnij przez


CreateUserWizard.ContinueDestinationPageUrl Właściwość

Definicja

Pobiera lub ustawia adres URL strony, którą użytkownik zobaczy po kliknięciu przycisku Kontynuuj na stronie powodzenia.

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

Wartość właściwości

Adres URL strony docelowej. Wartość domyślna to Empty.

Atrybuty

Przykłady

Poniższy przykład kodu używa właściwości , ContinueDestinationPageUrl aby zwrócić użytkownika do strony, którą wyświetlał użytkownik przed dotarciem do strony rejestracji.

<%@ 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>

Uwagi

Właściwość ContinueDestinationPageUrl zawiera adres URL strony sieci Web, którą użytkownik zobaczy po pomyślnym ukończeniu rejestracji w witrynie. Ustawiając ContinueDestinationPageUrl właściwość, możesz kontrolować pierwszą stronę, którą widzą nowo zarejestrowani użytkownicy.

ContinueDestinationPageUrl Gdy właściwość ma wartość Empty i użytkownik kliknie przycisk Kontynuuj, strona zostanie odświeżona, a wszystkie wartości w formularzu zostaną wyczyszczone.

Nie można ustawić tej właściwości według motywów ani motywów arkusza stylów. Aby uzyskać więcej informacji, zobacz ThemeableAttributei ASP.NET Motywy i skóry.

Dotyczy

Zobacz też