Vlastní registrační formulář   zodpovězená otázka

ASP.NET WebForms

Zdravím, hledal jsem snad všude možně a nikde sem nic nemohl najít,

Potřebuji aby se mi do tabulky Profiles při registraci zapsaly údaje které mám napsané v registračním formuláři

SQL Dotaz

CREATE TABLE dbo.Users (
UserId			int IDENTITY(1,1)	NOT NULL,
UserName		varchar(100)		NOT NULL,
PasswordHash		char(86)		NOT NULL,
PasswordSalt		char(5)			NOT NULL,
Email			varchar(100)		NOT NULL,
Comment			text			NULL,
Enabled			bit			NOT NULL,
DateCreated		datetime		NOT NULL,
DateLastLogin		datetime		NULL,
DateLastActivity	datetime		NULL,
DateLastPasswordChange	datetime		NOT NULL,
	
	CONSTRAINT PK_Users PRIMARY KEY CLUSTERED (UserId ASC),
	CONSTRAINT IX_Users_UserName UNIQUE NONCLUSTERED (UserName ASC),
)

CREATE TABLE dbo.[Profiles] (
	[ProfileId]	int IDENTITY(1,1)	NOT NULL,
	[UserName]	nvarchar(100)		NOT NULL,
	[FirstName]	nvarchar(32)		NULL,
	[LastName]	nvarchar(32)		NULL,
	[Avatar]	image			NULL,
	[Street]	nvarchar(max)		NULL,
	[HouseNumber]	nvarchar(max)		NULL,
	[Adress]	nvarchar(max)		NULL,
	[PostalCode]	nvarchar(max)		NULL,
	[TelNumber]	nvarchar(max)		NULL,
	[FaxNumber]	nvarchar(max)		NULL,
	[MobilNumber]	nvarchar(max)		NULL,
	[IcqNumber]	nvarchar(9)			NULL,
	[LastUpdate]	datetime			NOT NULL,

	CONSTRAINT PK_Profiles PRIMARY KEY CLUSTERED (ProfileId ASC)
)

ALTER TABLE [Profiles] ADD [UserName] varchar(100) NOT NULL REFERENCES [Users] ([UserName])

WEB.config

        <profile enabled="true" automaticSaveEnabled="false" defaultProvider="MyProfileProvider">
          <providers>
            <clear />
            <add name="MyProfileProvider"
                 type="Altairis.Web.Security.SimpleSqlProfileProvider, Altairis.Web.Security"
                 connectionStringName="MainPages"
                 tableName="Profiles"
                 keyColumnName="UserName"
                 lastUpdateColumnName="LastUpdate" />
          </providers>
          <properties>
            <add name="FullName" type="String" customProviderData="FullName;varchar;50" />
            <add name="BirthDate" type="DateTime" defaultValue="01.01.1900" customProviderData="BirthDate;smalldatetime" />
            <add name="PageSize" type="Int32" defaultValue="10" customProviderData="PageSize;int"/>
            <add name="FirstName" type="String" defaultValue="xxxxxxxxx" customProviderData="FirstName;nvarchar;max"/>
            <add name="LastName" type="String" defaultValue="xxxxxxxxx" customProviderData="LastName;nvarchar;max"/>
            <add name="Street" type="String" defaultValue="xxxxxxxxx" customProviderData="Street;nvarchar;max"/>
            <add name="HouseNumber" type="String" defaultValue="xxxx" customProviderData="HouseNumber;nvarchar;max"/>
            <add name="Adress" type="String" defaultValue="xxxxxxxxx" customProviderData="Adress;nvarchar;max"/>
            <add name="PostalCode" type="String" defaultValue="000 00" customProviderData="PostalCode;nvarchar;max"/>
            <add name="TelNumber" type="String" defaultValue="+420 000 000 000" customProviderData="TelNumber;nvarchar;max"/>
            <add name="FaxNumber" type="String" defaultValue="+420 000 000 000" customProviderData="FaxNumber;nvarchar;max"/>
            <add name="MobilNumber" type="String" defaultValue="+420 000 000 000" customProviderData="MobilNumber;nvarchar;max"/>
            <add name="IdStates" type="Int32" defaultValue="100" customProviderData="IdStates;int"/>
            <add name="IcqNumber" type="String" defaultValue="[null]" customProviderData="IcqNumber;nvarchar;9"/>
          </properties>
        </profile>

Registrační formulář

<%@ Control Language="VB" ClassName="Register" %>

<script runat="server">

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        RegisterUser.ContinueDestinationPageUrl = Request.QueryString("ReturnUrl")
    End Sub

    Protected Sub RegisterUser_CreatedUser(ByVal sender As Object, ByVal e As EventArgs) Handles RegisterUser.CreatedUser
        FormsAuthentication.SetAuthCookie(RegisterUser.UserName, False)
        
        Roles.AddUserToRole(RegisterUser.UserName, "users")
        
        Dim continueUrl As String = RegisterUser.ContinueDestinationPageUrl
        If String.IsNullOrEmpty(continueUrl) Then
            continueUrl = "~/"
        End If

        Response.Redirect(continueUrl)
    End Sub
</script>
<div class="box2">
        <br />
        <div class="top">
            <h2>
                Registrace
            </h2>
        </div>
        <div class="cont">
        <asp:CreateUserWizard ID="RegisterUser" runat="server" EnableViewState="false">
            <%-->
                <LayoutTemplate>
                    <asp:PlaceHolder ID="wizardStepPlaceholder" runat="server"></asp:PlaceHolder>
                    <asp:PlaceHolder ID="navigationPlaceholder" runat="server"></asp:PlaceHolder>
                </LayoutTemplate>
            --%>    
            <WizardSteps>
                <asp:CreateUserWizardStep ID="RegisterUserWizardStep" runat="server">
                    <ContentTemplate>
                        <p>
                            Použijte níže uvedený formulář pro vytvoření nového účtu.
                        </p>
                        <p>
                            Heslo musí mít minimálně <%= Membership.MinRequiredPasswordLength %> znaků.
                        </p>
                        <span class="failureNotification">
                            <asp:Literal ID="ErrorMessage" runat="server"></asp:Literal>
                        </span>
                        <asp:ValidationSummary ID="RegisterUserValidationSummary" runat="server" CssClass="failureNotification" 
                             ValidationGroup="RegisterUserValidationGroup"/>
                        <div class="accountInfo">
                            <fieldset class="register">
                                <legend>Informace o účtu</legend>
                                <table>
                                    <tr>
                                        <td>
                                            <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">Uživatelské jméno (POVINNÉ):</asp:Label>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="UserName" runat="server" CssClass="textEntry"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName" 
                                                 CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required." 
                                                 ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email">E-Mail (POVINNÉ):</asp:Label>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="Email" runat="server" CssClass="textEntry"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="EmailRequired" runat="server" ControlToValidate="Email" 
                                                 CssClass="failureNotification" ErrorMessage="E-mail is required." ToolTip="E-mail is required." 
                                                 ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Heslo (POVINNÉ):</asp:Label>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="Password" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password" 
                                                 CssClass="failureNotification" ErrorMessage="Password is required." ToolTip="Password is required." 
                                                 ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="ConfirmPasswordLabel" runat="server" AssociatedControlID="ConfirmPassword">Potvrdit heslo (POVINNÉ):</asp:Label>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="ConfirmPassword" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
                                            <asp:RequiredFieldValidator ControlToValidate="ConfirmPassword" CssClass="failureNotification" Display="Dynamic" 
                                                 ErrorMessage="Confirm Password is required." ID="ConfirmPasswordRequired" runat="server" 
                                                 ToolTip="Confirm Password is required." ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                            <asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="Password" ControlToValidate="ConfirmPassword" 
                                                 CssClass="failureNotification" Display="Dynamic" ErrorMessage="The Password and Confirmation Password must match."
                                                 ValidationGroup="RegisterUserValidationGroup">*</asp:CompareValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">
                                            <hr />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="FirstNameLabel" runat="server" AssociatedControlID="FirstName">Jméno (POVINNÉ):</asp:Label>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="FirstName" runat="server" CssClass="textEntry"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="FirstName" 
                                                 CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required." 
                                                 ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="LastNameLabel" runat="server" AssociatedControlID="LastName">Příjmení (POVINNÉ):</asp:Label>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="LastName" runat="server" CssClass="textEntry"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="LastName" 
                                                 CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required." 
                                                 ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">
                                            <hr />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="StreetLabel" runat="server" AssociatedControlID="Adress">Město (POVINNÉ):</asp:Label>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="Street" runat="server" CssClass="textEntry"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="Street" 
                                                 CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required." 
                                                 ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="AdressLabel" runat="server" AssociatedControlID="Street">Ulice a číslo popisné (POVINNÉ):</asp:Label>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="Adress" runat="server" CssClass="textEntry"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="Adress" 
                                                 CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required." 
                                                 ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="PostalCodeLabel" runat="server" AssociatedControlID="PostalCode">PSČ (POVINNÉ):</asp:Label>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="PostalCode" runat="server" CssClass="textEntry"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="PostalCode" 
                                                 CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required." 
                                                 ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">
                                            <hr />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="TelNumberLabel" runat="server" AssociatedControlID="TelNumber">Tel. (NEPOVINNÉ):</asp:Label>
                                        </td>
                                        <td>
                                        <asp:TextBox ID="TelNumber" runat="server" CssClass="textEntry"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="TelNumber" 
                                             CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required." 
                                             ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="FaxNumberLabel" runat="server" AssociatedControlID="FaxNumber">FAX (NEPOVINNÉ):</asp:Label>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="FaxNumber" runat="server" CssClass="textEntry"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="FaxNumber" 
                                                 CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required." 
                                                 ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="MobilNumberLabel" runat="server" AssociatedControlID="MobilNumber">Mobil (POVINNÉ):</asp:Label>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="MobilNumber" runat="server" CssClass="textEntry"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="MobilNumber" 
                                                 CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required." 
                                                 ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                </table>
                            </fieldset>
                            <p class="submitButton">
                                <asp:Button ID="CreateUserButton" runat="server" CommandName="MoveNext" Text="Vytvořit účet" 
                                     ValidationGroup="RegisterUserValidationGroup"/>
                            </p>
                        </div>
                    </ContentTemplate>
                    <CustomNavigationTemplate>
                    </CustomNavigationTemplate>
                </asp:CreateUserWizardStep>
            </WizardSteps>
        </asp:CreateUserWizard>
        </div>
        <div class="foot">
        </div>
    </div>
<!--  END RIGHT BOX -->

Předem děkuji za radu

nahlásit spamnahlásit spam 0 odpovědětodpovědět

Nastudujte si práci s profily - návodů je na netu hromada.Musíte v code-behind proměnné ukládat do daného/aktuálního profilu a ne si jen nadefinovat tabulku,web.config a tím skončit.Například viz.http://msdn.microsoft.com/en-us/library/...

nahlásit spamnahlásit spam 0 odpovědětodpovědět

Tak jsem přidal tento code který s tím měl pomoci a nakonec mi to zhodil a je to dle návodu co je na té stránce která je v předchozím příspěvku

    Protected Sub Page_PreRender()
        Profile.FirstName = txtFirstNameBox.Text
        Profile.LastName = txtLastNameBox.Text
        Profile.Street = txtStreetBox.Text
        Profile.HouseNumber = txtHouseNumberBox.Text
        Profile.Adress = txtAdressBox.Text
        Profile.PostalCode = txtPostalCodeBox.Text
        Profile.TelNumber = txtTelNumberBox.Text
        Profile.FaxNumber = txtFaxNumberBox.Text
        Profile.MobilNumber = txtMobilNumberBox.Text
        Profile.IcqNumber = txtIcqNumber.Text
    End Sub

nahlásit spamnahlásit spam -1 / 1 odpovědětodpovědět

Jak shodil? chybová hláška?

nahlásit spamnahlásit spam 0 odpovědětodpovědět

můžete se podívat na http://www.jelineku.aspone.cz/Acc/Regist...

nahlásit spamnahlásit spam 0 odpovědětodpovědět

myslíte že by jste mi sem mohl někdo dát vzor??? podle jakého bycxh to mohl opravit???

nahlásit spamnahlásit spam -4 / 4 odpovědětodpovědět

chybová hláška 404.0 not found

nahlásit spamnahlásit spam 0 odpovědětodpovědět

Určitě nedávejte načtení profilových dat to metody Page_PreRender()!Na stránce máte tlačítko,po jehož stisknutí by mělo dojít k vytvoření vyplněného accountu.Tzn.v události stisknutí tlačítka nebo nějaké jiné nadefinované,umístěte kód pro uložení profilu.

Bylo by vhodné se něco o technologii naučit,alespon životní cyklus stránky a podobné základní věci-bez nichž nelze nikdy nic kloudného naprogramovat.

nahlásit spamnahlásit spam 0 odpovědětodpovědět

Tak jsem to vyřešil následně

VB.NET CODE


    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        RegisterUser.ContinueDestinationPageUrl = Request.QueryString("ReturnUrl")
        
        Response.Expires = 60
        Response.ExpiresAbsolute = DateTime.Now.AddDays(-1D)
        Response.AddHeader("pragma", "no-cache")
        Response.AddHeader("cache-control", "private")
        Response.CacheControl = "no-cache"

    End Sub

    Protected Sub RegisterUser_CreatedUser(ByVal sender As Object, ByVal e As System.EventArgs) Handles RegisterUser.CreatedUser
        FormsAuthentication.SetAuthCookie(RegisterUser.UserName, False)
        
        Roles.AddUserToRole(RegisterUser.UserName, "users")
        
        Dim continueUrl As String = RegisterUser.ContinueDestinationPageUrl
        If String.IsNullOrEmpty(continueUrl) Then
            continueUrl = "~/"
        End If

        Response.Redirect(continueUrl)
        

        Dim PB As ProfileBase = ProfileBase.Create(RegisterUser.UserName.ToString)

        PB.SetPropertyValue("FirstName", FirstNameBox.Text)
        PB.SetPropertyValue("LastName", LastNameBox.Text)
        PB.SetPropertyValue("CompanyName", CompanyNameBox.Text)
        PB.SetPropertyValue("Street", StreetBox.Text)
        PB.SetPropertyValue("HouseNumber", HouseNumberBox.Text)
        PB.SetPropertyValue("Adress", AdressBox.Text)
        PB.SetPropertyValue("PostalCode", PostalCodeBox.Text)
        PB.SetPropertyValue("TelNumber", TelNumberBox.Text)
        PB.SetPropertyValue("FaxNumber", FaxNumberBox.Text)
        PB.SetPropertyValue("MobilNumber", MobilNumberBox.Text)
        PB.SetPropertyValue("IcqNumber", IcqNumberBox.Text)
        PB.SetPropertyValue("SkypeName", SkypeBox.Text)
        PB.SetPropertyValue("Jabber", JabberBox.Text)
        PB.SetPropertyValue("Country", CountryDropDown.Id)
        PB.SetPropertyValue("Question", QuestionDropDown.Id)
        PB.SetPropertyValue("Answer", AnswerBox.Text)
        PB.Save()

    End Sub

Script

    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:MainPages %>" 
        SelectCommand="SELECT * FROM [States] ORDER BY [name]">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:MainPages %>" 
        SelectCommand="SELECT * FROM [Questions] ORDER BY [IdQuestion]">
    </asp:SqlDataSource>
        <!--  START RIGHT BOX -->
    <div class="box2">
            <br />
            <div class="top">
                <h2>
                    Registrace
                </h2>
            </div>
            <div class="cont">
                <asp:CreateUserWizard ID="RegisterUser" runat="server" Width="630px">
                    <WizardSteps>
                        <asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server">
                            <ContentTemplate>
                                <p>
                                    Použijte níže uvedený formulář pro vytvoření nového účtu.
                                </p>
                                <p>
                                    Heslo musí mít minimálně 6 znaků.
                                </p>
                                <span class="failureNotification">
                                    <asp:Literal ID="ErrorMessage" runat="server"></asp:Literal>
                                </span>
                                <asp:ValidationSummary ID="RegisterUserValidationSummary" runat="server" CssClass="failureNotification" 
                                     ValidationGroup="RegisterUserValidationGroup"/>
                                <div class="accountInfo">
                                    <fieldset class="register">
                                        <legend>
                                        Informace o účtu
                                        </legend>
                                        <table>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName" CssClass="Label">Uživatelské jméno:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="UserName" runat="server" CssClass="textEntry"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName" 
                                                         CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required." 
                                                         ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email" CssClass="Label">E-Mail:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="Email" runat="server" CssClass="textEntry"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="EmailRequired" runat="server" ControlToValidate="Email" 
                                                         CssClass="failureNotification" ErrorMessage="E-mail is required." ToolTip="E-mail is required." 
                                                         ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password" CssClass="Label">Heslo:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="Password" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password" 
                                                         CssClass="failureNotification" ErrorMessage="Password is required." ToolTip="Password is required." 
                                                         ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="ConfirmPasswordLabel" runat="server" AssociatedControlID="ConfirmPassword" CssClass="Label">Potvrdit heslo:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="ConfirmPassword" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ControlToValidate="ConfirmPassword" CssClass="failureNotification" Display="Dynamic" 
                                                         ErrorMessage="Confirm Password is required." ID="ConfirmPasswordRequired" runat="server" 
                                                         ToolTip="Confirm Password is required." ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                                    <asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="Password" ControlToValidate="ConfirmPassword" 
                                                         CssClass="failureNotification" Display="Dynamic" ErrorMessage="The Password and Confirmation Password must match."
                                                         ValidationGroup="RegisterUserValidationGroup">*</asp:CompareValidator>
                                                </td>
                                            </tr>
                                        </table>
                                    </fieldset>
                                    <p class="submitButton">
                                        <asp:Button ID="CreateUserButton" runat="server" CommandName="MoveNext" Text="Vytvořit účet" 
                                             ValidationGroup="RegisterUserValidationGroup"/>
                                    </p>
                                </div>
                            </ContentTemplate>
                            <CustomNavigationTemplate>
                            </CustomNavigationTemplate>
                        </asp:CreateUserWizardStep>
                        <asp:WizardStep ID="CreateProfile" runat="server" Title="Ukaž" StepType="Start">
                            <p>
                                Použijte níže uvedený formulář pro vytvoření profilu.
                            </p>
                            <p>
                                Bez vyplněného profilu nemůžete objednávat vytvoření webových stránek.
                            </p>
                            <span class="failureNotification">
                                <asp:Literal ID="ErrorMessage" runat="server"></asp:Literal>
                            </span>
                            <asp:ValidationSummary ID="RegisterUserValidationSummary" runat="server" CssClass="failureNotification" 
                                ValidationGroup="RegisterUserValidationGroup"/>
                            <div class="accountInfo">
                                <fieldset class="register">
                                    <legend>
                                        Vytvoření profilu
                                    </legend>
                                    <table>
                                        <tr>
                                            <td>
                                                <asp:Label ID="FirstNameLabel" runat="server" AssociatedControlID="FirstNameLabel" CssClass="Label">Jméno:</asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="FirstNameBox" runat="server" CssClass="textEntry"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="FirstNameRequired" runat="server" ControlToValidate="FirstNameBox" 
                                                     CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required." 
                                                     ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:Label ID="LastNameLabel" runat="server" AssociatedControlID="LastNameLabel" CssClass="Label">Příjmení:</asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="LastNameBox" runat="server" CssClass="textEntry"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="LastNameRequired" runat="server" ControlToValidate="LastNameBox" 
                                                     CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required." 
                                                     ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2">
                                                <hr />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:Label ID="CompanyNameLabel" runat="server" AssociatedControlID="CompanyNameLabel" CssClass="Label">Jméno Firmy:</asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="CompanyNameBox" runat="server" CssClass="textEntry"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2">
                                                <hr />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:Label ID="StreetLabel" runat="server" AssociatedControlID="StreetLabel" CssClass="Label">Ulice:</asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="AdressBox" runat="server" CssClass="textEntry"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="AdressRequired" runat="server" ControlToValidate="StreetBox" 
                                                     CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required." 
                                                     ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                                <td>
                                                    <asp:Label ID="HouseNumberLabel" runat="server" AssociatedControlID="HouseNumberLabel" CssClass="Label">Číslo popisné:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="HouseNumberBox" runat="server" CssClass="textEntry"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="HouseNumberBox" 
                                                         CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required." 
                                                         ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="AdressLabel" runat="server" AssociatedControlID="AdressLabel" CssClass="Label">Město:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="StreetBox" runat="server" CssClass="textEntry"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="StreetRequired" runat="server" ControlToValidate="AdressBox" 
                                                         CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required." 
                                                         ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="PostalCodeLabel" runat="server" AssociatedControlID="PostalCodeLabel" CssClass="Label">PSČ:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="PostalCodeBox" runat="server" CssClass="textEntry"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="PostalCodeRequired" runat="server" ControlToValidate="PostalCodeBox" 
                                                         CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required." 
                                                         ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="2">
                                                    <hr />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="TelNumberLabel" runat="server" AssociatedControlID="TelNumberLabel" CssClass="Label">Tel.:</asp:Label>
                                                </td>
                                                <td>
                                                <asp:TextBox ID="TelNumberBox" runat="server" CssClass="textEntry"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="FaxNumberLabel" runat="server" AssociatedControlID="FaxNumberLabel" CssClass="Label">FAX:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="FaxNumberBox" runat="server" CssClass="textEntry"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="MobilNumberLabel" runat="server" AssociatedControlID="MobilNumberLabel" CssClass="Label">Mobil:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="MobilNumberBox" runat="server" CssClass="textEntry"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="MobilNumberRequired" runat="server" ControlToValidate="MobilNumberBox" 
                                                         CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required." 
                                                         ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="IcqNumberLabel" runat="server" AssociatedControlID="IcqNumberLabel" CssClass="Label">ICQ:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="IcqNumberBox" runat="server" CssClass="textEntry"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="SkypeLabel" runat="server" AssociatedControlID="SkypeLabel" CssClass="Label">Skype:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="SkypeBox" runat="server" CssClass="textEntry"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="JabberLabel" runat="server" AssociatedControlID="JabberLabel" CssClass="Label">Jabber:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="JabberBox" runat="server" CssClass="textEntry"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="2">
                                                    <hr />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="CountryLabel" runat="server" AssociatedControlID="CountryLabel" CssClass="Label">Země původu:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:DropDownList ID="CountryDropDown" runat="server" 
                                                        DataSourceID="SqlDataSource1" DataTextField="name" 
                                                        DataValueField="IdState"
                                                        AppendDataBoundItems="True"
                                                        SelectedValue='<%# Bind("Country") %>'
                                                        CssClass="DropDown" >
                                                        <asp:ListItem Text="Nevybráno" Value="100" />
                                                    </asp:DropDownList>
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="CountryDropDown" 
                                                         CssClass="failureNotification" ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="2">
                                                    <hr />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="QuestionLabel" runat="server" AssociatedControlID="QuestionLabel" CssClass="Label">Bezpečnostní otázka:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:DropDownList ID="QuestionDropDown" runat="server" 
                                                        DataSourceID="SqlDataSource2" DataTextField="NameQuestion" 
                                                        DataValueField="IdQuestion"
                                                        AppendDataBoundItems="True"
                                                        SelectedValue='<%# Bind("Question") %>'
                                                        CssClass="DropDown" >
                                                        <asp:ListItem Text="Nevybráno" Value="" />
                                                    </asp:DropDownList>
                                                    <asp:RequiredFieldValidator ID="QuestionRequired" runat="server" ControlToValidate="QuestionDownList" 
                                                         CssClass="failureNotification" ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="AnswerLabel" runat="server" AssociatedControlID="AnswerLabel" CssClass="Label">Odpověď:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="AnswerBox" runat="server" CssClass="textEntry"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="AnswerBox" 
                                                         CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required." 
                                                         ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                        </table>
                                
                                </fieldset>
                            <p class="submitButton">
                                <asp:Button ID="CreateProfileButton" runat="server" CommandName="MoveNext" Text="Vytvořit účet" 
                                    ValidationGroup="RegisterUserValidationGroup"/>
                            </p>
                        </asp:WizardStep>
                    </WizardSteps>
                </asp:CreateUserWizard>
            </div>
            <div class="foot">
            </div>
        </div>
        <!--  END RIGHT BOX -->

SQL Dotaz

CREATE TABLE dbo.Users (
UserId			int IDENTITY(1,1)	NOT NULL,
UserName		varchar(100)		NOT NULL,
PasswordHash		char(86)		NOT NULL,
PasswordSalt		char(5)			NOT NULL,
Email			varchar(100)		NOT NULL,
Comment			text			NULL,
Enabled			bit			NOT NULL,
DateCreated		datetime		NOT NULL,
DateLastLogin		datetime		NULL,
DateLastActivity	datetime		NULL,
DateLastPasswordChange	datetime		NOT NULL,
	
	CONSTRAINT PK_Users PRIMARY KEY CLUSTERED (UserId ASC),
	CONSTRAINT IX_Users_UserName UNIQUE NONCLUSTERED (UserName ASC),
)


CREATE TABLE dbo.[Profiles] (
	[ProfileId]	int IDENTITY(1,1)	NOT NULL,
	[UserName]	nvarchar(100)		NOT NULL,
	[LastUpdate]	datetime		NOT NULL,
	[FirstName]	nvarchar(max)		NOT NULL,
	[LastName]	nvarchar(max)		NOT NULL,
	[CompanyName]	nvarchar(max)		NULL,
	[Avatar]	image			NULL,
	[Street]	nvarchar(max)		NOT NULL,
	[HouseNumber]	nvarchar(max)		NOT NULL,
	[Adress]	nvarchar(max)		NOT NULL,
	[PostalCode]	nvarchar(max)		NOT NULL,
	[TelNumber]	nvarchar(max)		NULL,
	[FaxNumber]	nvarchar(max)		NULL,
	[MobilNumber]	nvarchar(max)		NOT NULL,
	[IcqNumber]	nvarchar(9)		NULL,
	[SkypeName]	nvarchar(max)		NULL,
	[Jabber]	nvarchar(max)		NULL,
	[Country]	int			NOT NULL,
	[Question]	int			NOT NULL,
	[Answer]	nvarchar(max)		NOT NULL,

	CONSTRAINT PK_Profiles PRIMARY KEY CLUSTERED (ProfileId ASC),
	CONSTRAINT FK_Profiles_States FOREIGN KEY (Country)
		REFERENCES dbo.States (IdState) ON UPDATE CASCADE ON DELETE CASCADE,
	CONSTRAINT FK_Profiles_Questions FOREIGN KEY (Question)
		REFERENCES dbo.Questions (IdQuestion) ON UPDATE CASCADE ON DELETE CASCADE
)

Web.Config

        <profile enabled="true" automaticSaveEnabled="false" defaultProvider="MyProfileProvider">
          <providers>
            <clear />
            <add name="MyProfileProvider"
                 type="Altairis.Web.Security.SimpleSqlProfileProvider, Altairis.Web.Security"
                 connectionStringName="MainPages"
                 tableName="Profiles"
                 keyColumnName="UserName"
                 lastUpdateColumnName="LastUpdate" />
          </providers>
          <properties>
            <add name="FirstName" type="String" defaultValue="Jméno" customProviderData="FirstName;nvarchar;max"/>
            <add name="LastName" type="String" defaultValue="Příjmení" customProviderData="LastName;nvarchar;max"/>
            <add name="CompanyName" type="String" defaultValue="" customProviderData="CompanyName;nvarchar;max"/>
            <add name="Avatar" type="Byte[]" defaultValue="" customProviderData="Avatar;image"/>
            <add name="Street" type="String" defaultValue="Ulice" customProviderData="Street;nvarchar;max"/>
            <add name="HouseNumber" type="String" defaultValue="Číslo popisné" customProviderData="HouseNumber;nvarchar;max"/>
            <add name="Adress" type="String" defaultValue="Město" customProviderData="Adress;nvarchar;max"/>
            <add name="PostalCode" type="String" defaultValue="PSČ" customProviderData="PostalCode;nvarchar;max"/>
            <add name="TelNumber" type="String" defaultValue="" customProviderData="TelNumber;nvarchar;max"/>
            <add name="FaxNumber" type="String" defaultValue="" customProviderData="FaxNumber;nvarchar;max"/>
            <add name="MobilNumber" type="String" defaultValue="Mobil" customProviderData="MobilNumber;nvarchar;max"/>
            <add name="IcqNumber" type="String" defaultValue="" customProviderData="IcqNumber;nvarchar;9"/>
            <add name="SkypeName" type="String" defaultValue="" customProviderData="SkypeName;nvarchar;max"/>
            <add name="Jabber" type="String" defaultValue="" customProviderData="Jabber;nvarchar;max"/>
            <add name="Country" type="Int" defaultValue="Země původu" customProviderData="Country;int"/>
            <add name="Question" type="Int" defaultValue="Otázka" customProviderData="Question;int"/>
            <add name="Answer" type="String" defaultValue="Odpověď" customProviderData="Answer;nvarchar;max"/>
          </properties>
        </profile>

Ťeť mám akorát ten problém že když dám u 1 kroku vytvořit účet tak nevím jak to udělat aby to přešlo na 2 krok, co mám nastavit do CommandName u

<asp:Button ID="CreateUserButton" runat="server" CommandName="MoveNext" Text="Vytvořit účet" ValidationGroup="RegisterUserValidationGroup"/>
nahlásit spamnahlásit spam 0 odpovědětodpovědět

Jinak celý script vypadá následně:

<%@ Control Language="VB" ClassName="Register" Debug="true" %>

<script runat="server">
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        RegisterUser.ContinueDestinationPageUrl = Request.QueryString("ReturnUrl")
        
        Response.Expires = 60
        Response.ExpiresAbsolute = DateTime.Now.AddDays(-1D)
        Response.AddHeader("pragma", "no-cache")
        Response.AddHeader("cache-control", "private")
        Response.CacheControl = "no-cache"

    End Sub

    Protected Sub RegisterUser_CreatedUser(ByVal sender As Object, ByVal e As System.EventArgs) Handles RegisterUser.CreatedUser
        FormsAuthentication.SetAuthCookie(RegisterUser.UserName, False)
        
        Roles.AddUserToRole(RegisterUser.UserName, "users")
        
        Dim continueUrl As String = RegisterUser.ContinueDestinationPageUrl
        If String.IsNullOrEmpty(continueUrl) Then
            continueUrl = "~/"
        End If

        Response.Redirect(continueUrl)
        

        Dim PB As ProfileBase = ProfileBase.Create(RegisterUser.UserName.ToString)

        PB.SetPropertyValue("FirstName", FirstNameBox.Text)
        PB.SetPropertyValue("LastName", LastNameBox.Text)
        PB.SetPropertyValue("CompanyName", CompanyNameBox.Text)
        PB.SetPropertyValue("Street", StreetBox.Text)
        PB.SetPropertyValue("HouseNumber", HouseNumberBox.Text)
        PB.SetPropertyValue("Adress", AdressBox.Text)
        PB.SetPropertyValue("PostalCode", PostalCodeBox.Text)
        PB.SetPropertyValue("TelNumber", TelNumberBox.Text)
        PB.SetPropertyValue("FaxNumber", FaxNumberBox.Text)
        PB.SetPropertyValue("MobilNumber", MobilNumberBox.Text)
        PB.SetPropertyValue("IcqNumber", IcqNumberBox.Text)
        PB.SetPropertyValue("SkypeName", SkypeBox.Text)
        PB.SetPropertyValue("Jabber", JabberBox.Text)
        PB.SetPropertyValue("Country", CountryDropDown.Id)
        PB.SetPropertyValue("Question", QuestionDropDown.Id)
        PB.SetPropertyValue("Answer", AnswerBox.Text)
        PB.Save()

    End Sub
</script>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:MainPages %>" 
        SelectCommand="SELECT * FROM [States] ORDER BY [name]">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:MainPages %>" 
        SelectCommand="SELECT * FROM [Questions] ORDER BY [IdQuestion]">
    </asp:SqlDataSource>
        <!--  START RIGHT BOX -->
    <div class="box2">
            <br />
            <div class="top">
                <h2>
                    Registrace
                </h2>
            </div>
            <div class="cont">
                <asp:CreateUserWizard ID="RegisterUser" runat="server" Width="630px">
                    <WizardSteps>
                        <asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server">
                            <ContentTemplate>
                                <p>
                                    Použijte níže uvedený formulář pro vytvoření nového účtu.
                                </p>
                                <p>
                                    Heslo musí mít minimálně 6 znaků.
                                </p>
                                <span class="failureNotification">
                                    <asp:Literal ID="ErrorMessage" runat="server"></asp:Literal>
                                </span>
                                <asp:ValidationSummary ID="RegisterUserValidationSummary" runat="server" CssClass="failureNotification" 
                                     ValidationGroup="RegisterUserValidationGroup"/>
                                <div class="accountInfo">
                                    <fieldset class="register">
                                        <legend>
                                        Informace o účtu
                                        </legend>
                                        <table>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName" CssClass="Label">Uživatelské jméno:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="UserName" runat="server" CssClass="textEntry"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName" 
                                                         CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required." 
                                                         ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email" CssClass="Label">E-Mail:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="Email" runat="server" CssClass="textEntry"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="EmailRequired" runat="server" ControlToValidate="Email" 
                                                         CssClass="failureNotification" ErrorMessage="E-mail is required." ToolTip="E-mail is required." 
                                                         ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password" CssClass="Label">Heslo:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="Password" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password" 
                                                         CssClass="failureNotification" ErrorMessage="Password is required." ToolTip="Password is required." 
                                                         ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="ConfirmPasswordLabel" runat="server" AssociatedControlID="ConfirmPassword" CssClass="Label">Potvrdit heslo:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="ConfirmPassword" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ControlToValidate="ConfirmPassword" CssClass="failureNotification" Display="Dynamic" 
                                                         ErrorMessage="Confirm Password is required." ID="ConfirmPasswordRequired" runat="server" 
                                                         ToolTip="Confirm Password is required." ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                                    <asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="Password" ControlToValidate="ConfirmPassword" 
                                                         CssClass="failureNotification" Display="Dynamic" ErrorMessage="The Password and Confirmation Password must match."
                                                         ValidationGroup="RegisterUserValidationGroup">*</asp:CompareValidator>
                                                </td>
                                            </tr>
                                        </table>
                                    </fieldset>
                                    <p class="submitButton">
                                        <asp:Button ID="CreateUserButton" runat="server" CommandName="MoveNext" Text="Vytvořit účet" 
                                             ValidationGroup="RegisterUserValidationGroup"/>
                                    </p>
                                </div>
                            </ContentTemplate>
                            <CustomNavigationTemplate>
                            </CustomNavigationTemplate>
                        </asp:CreateUserWizardStep>
                        <asp:WizardStep ID="CreateProfile" runat="server" Title="Ukaž" StepType="Start">
                            <p>
                                Použijte níže uvedený formulář pro vytvoření profilu.
                            </p>
                            <p>
                                Bez vyplněného profilu nemůžete objednávat vytvoření webových stránek.
                            </p>
                            <span class="failureNotification">
                                <asp:Literal ID="ErrorMessage" runat="server"></asp:Literal>
                            </span>
                            <asp:ValidationSummary ID="RegisterUserValidationSummary" runat="server" CssClass="failureNotification" 
                                ValidationGroup="RegisterUserValidationGroup"/>
                            <div class="accountInfo">
                                <fieldset class="register">
                                    <legend>
                                        Vytvoření profilu
                                    </legend>
                                    <table>
                                        <tr>
                                            <td>
                                                <asp:Label ID="FirstNameLabel" runat="server" AssociatedControlID="FirstNameLabel" CssClass="Label">Jméno:</asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="FirstNameBox" runat="server" CssClass="textEntry"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="FirstNameRequired" runat="server" ControlToValidate="FirstNameBox" 
                                                     CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required." 
                                                     ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:Label ID="LastNameLabel" runat="server" AssociatedControlID="LastNameLabel" CssClass="Label">Příjmení:</asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="LastNameBox" runat="server" CssClass="textEntry"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="LastNameRequired" runat="server" ControlToValidate="LastNameBox" 
                                                     CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required." 
                                                     ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2">
                                                <hr />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:Label ID="CompanyNameLabel" runat="server" AssociatedControlID="CompanyNameLabel" CssClass="Label">Jméno Firmy:</asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="CompanyNameBox" runat="server" CssClass="textEntry"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2">
                                                <hr />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:Label ID="StreetLabel" runat="server" AssociatedControlID="StreetLabel" CssClass="Label">Ulice:</asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="AdressBox" runat="server" CssClass="textEntry"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="AdressRequired" runat="server" ControlToValidate="StreetBox" 
                                                     CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required." 
                                                     ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                                <td>
                                                    <asp:Label ID="HouseNumberLabel" runat="server" AssociatedControlID="HouseNumberLabel" CssClass="Label">Číslo popisné:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="HouseNumberBox" runat="server" CssClass="textEntry"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="HouseNumberBox" 
                                                         CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required." 
                                                         ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="AdressLabel" runat="server" AssociatedControlID="AdressLabel" CssClass="Label">Město:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="StreetBox" runat="server" CssClass="textEntry"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="StreetRequired" runat="server" ControlToValidate="AdressBox" 
                                                         CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required." 
                                                         ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="PostalCodeLabel" runat="server" AssociatedControlID="PostalCodeLabel" CssClass="Label">PSČ:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="PostalCodeBox" runat="server" CssClass="textEntry"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="PostalCodeRequired" runat="server" ControlToValidate="PostalCodeBox" 
                                                         CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required." 
                                                         ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="2">
                                                    <hr />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="TelNumberLabel" runat="server" AssociatedControlID="TelNumberLabel" CssClass="Label">Tel.:</asp:Label>
                                                </td>
                                                <td>
                                                <asp:TextBox ID="TelNumberBox" runat="server" CssClass="textEntry"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="FaxNumberLabel" runat="server" AssociatedControlID="FaxNumberLabel" CssClass="Label">FAX:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="FaxNumberBox" runat="server" CssClass="textEntry"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="MobilNumberLabel" runat="server" AssociatedControlID="MobilNumberLabel" CssClass="Label">Mobil:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="MobilNumberBox" runat="server" CssClass="textEntry"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="MobilNumberRequired" runat="server" ControlToValidate="MobilNumberBox" 
                                                         CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required." 
                                                         ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="IcqNumberLabel" runat="server" AssociatedControlID="IcqNumberLabel" CssClass="Label">ICQ:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="IcqNumberBox" runat="server" CssClass="textEntry"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="SkypeLabel" runat="server" AssociatedControlID="SkypeLabel" CssClass="Label">Skype:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="SkypeBox" runat="server" CssClass="textEntry"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="JabberLabel" runat="server" AssociatedControlID="JabberLabel" CssClass="Label">Jabber:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="JabberBox" runat="server" CssClass="textEntry"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="2">
                                                    <hr />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="CountryLabel" runat="server" AssociatedControlID="CountryLabel" CssClass="Label">Země původu:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:DropDownList ID="CountryDropDown" runat="server" 
                                                        DataSourceID="SqlDataSource1" DataTextField="name" 
                                                        DataValueField="IdState"
                                                        AppendDataBoundItems="True"
                                                        SelectedValue='<%# Bind("Country") %>'
                                                        CssClass="DropDown" >
                                                        <asp:ListItem Text="Nevybráno" Value="100" />
                                                    </asp:DropDownList>
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="CountryDropDown" 
                                                         CssClass="failureNotification" ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="2">
                                                    <hr />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="QuestionLabel" runat="server" AssociatedControlID="QuestionLabel" CssClass="Label">Bezpečnostní otázka:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:DropDownList ID="QuestionDropDown" runat="server" 
                                                        DataSourceID="SqlDataSource2" DataTextField="NameQuestion" 
                                                        DataValueField="IdQuestion"
                                                        AppendDataBoundItems="True"
                                                        SelectedValue='<%# Bind("Question") %>'
                                                        CssClass="DropDown" >
                                                        <asp:ListItem Text="Nevybráno" Value="" />
                                                    </asp:DropDownList>
                                                    <asp:RequiredFieldValidator ID="QuestionRequired" runat="server" ControlToValidate="QuestionDownList" 
                                                         CssClass="failureNotification" ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="AnswerLabel" runat="server" AssociatedControlID="AnswerLabel" CssClass="Label">Odpověď:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="AnswerBox" runat="server" CssClass="textEntry"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="AnswerBox" 
                                                         CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required." 
                                                         ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                        </table>
                                
                                </fieldset>
                            <p class="submitButton">
                                <asp:Button ID="CreateProfileButton" runat="server" CommandName="MoveNext" Text="Vytvořit účet" 
                                    ValidationGroup="RegisterUserValidationGroup"/>
                            </p>
                        </asp:WizardStep>
                    </WizardSteps>
                </asp:CreateUserWizard>
            </div>
            <div class="foot">
            </div>
        </div>
        <!--  END RIGHT BOX -->

nahlásit spamnahlásit spam 0 odpovědětodpovědět

tak jsem to chtěl vyřešit a i když to není potrženo jako chyba tak mi to při kompilaci háže error compilation BC30451:

obrázek zde: http://jelineku.aspone.cz/error_compilat...

VB CODE zde:

        Dim continueUrl As String = RegisterUser.ContinueDestinationPageUrl
        If String.IsNullOrEmpty(WizardSteps) Then
            WizardSteps.Add = "CreateProfile"
        ElseIf String.IsNullOrEmpty(continueUrl) Then
            continueUrl = "~/"
        End If

navázání na předchozí příspěvek upravený continueUrl

nahlásit spamnahlásit spam 0 odpovědětodpovědět

Hoďte spíš odkaz na obrázek s danou chybou a ne kódem

nahlásit spamnahlásit spam 0 odpovědětodpovědět

obrázek s chybou zde:

http://jelineku.aspone.cz/error_Compilat...

nahlásit spamnahlásit spam 0 odpovědětodpovědět

Proměnná WizardSteps neexistuje,respektive od této třídy není vytvořena instance.

nahlásit spamnahlásit spam 0 odpovědětodpovědět

a mohl bych nějaký příklad???

nahlásit spamnahlásit spam -3 / 3 odpovědětodpovědět

Není na co dávat příklad.

A co se tím snažíte udělat? z kódu to neni moc jasné.

nahlásit spamnahlásit spam 0 odpovědětodpovědět

Navíc v kódu testujete,zda je string prázdý nebo null a to nemůže WizardSteps nikdy být - nejde totiž o string :)) Což snad chápete.

nahlásit spamnahlásit spam 1 / 1 odpovědětodpovědět

aha, chybyčka no prostě když si uživatel vytvoří účet tak aby ho to přesměrovalo na WizardStep vytvoření profilu protože takhle to povolí jen vytvořit profil a nic víc

nahlásit spamnahlásit spam 0 odpovědětodpovědět
                       
Nadpis:
Antispam: Komu se občas házejí perly?
Příspěvek bude publikován pod identitou   anonym.
  • Administrátoři si vyhrazují právo komentáře upravovat či mazat bez udání důvodu.
    Mazány budou zejména komentáře obsahující vulgarity nebo porušující pravidla publikování.
  • Pokud nejste zaregistrováni, Vaše IP adresa bude zveřejněna. Pokud s tímto nesouhlasíte, příspěvek neodesílejte.

přihlásit pomocí externího účtu

přihlásit pomocí jména a hesla

Uživatel:
Heslo:

zapomenuté heslo

 

založit nový uživatelský účet

zaregistrujte se

 
zavřít

Nahlásit spam

Opravdu chcete tento příspěvek nahlásit pro porušování pravidel fóra?

Nahlásit Zrušit

Chyba

zavřít

feedback