Zdravím, potřeboval bych poradit s registračním formulářem, dodal jsem tam nějaké další vlastní věci viz tabulka níže a když si zaregistruju testovacího uživatele tak do těch ostatních buněk se mi nic neuloží ikdyž je vyplním, ve web.configu jsem je přidal 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,
FirstName nvarchar(max) NULL,
LastName nvarchar(max) NULL,
Street nvarchar(max) NULL,
Adress nvarchar(max) NULL,
PostalCode nvarchar(max) NULL,
TelNumber nvarchar(max) NULL,
FaxNumber nvarchar(max) NULL,
MobilNumber nvarchar(max) NULL,
CONSTRAINT PK_Users PRIMARY KEY CLUSTERED (UserId ASC),
CONSTRAINT IX_Users_UserName UNIQUE NONCLUSTERED (UserName ASC),
)
Registrační formulář
<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ů. Z toho musí být alespoň <%=Membership.MinRequiredNonAlphanumericCharacters%> alfanumerické znaky.
</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>
Web.config
<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" customProviderData="FirstName;nvarchar;max"/>
<add name="LastName" type="String" customProviderData="LastName;nvarchar;max"/>
<add name="Street" type="String" customProviderData="Street;nvarchar;max"/>
<add name="Adress" type="String" customProviderData="Adress;nvarchar;max"/>
<add name="PostalCode" type="String" customProviderData="PostalCode;nvarchar;max"/>
<add name="TelNumber" type="String" customProviderData="TelNumber;nvarchar;max"/>
<add name="FaxNumber" type="String" customProviderData="FaxNumber;nvarchar;max"/>
<add name="MobilNumber" type="String" customProviderData="MobilNumber;nvarchar;max"/>
<add name="IdStates" type="Int32" defaultValue="100" customProviderData="IdStates;int"/>
</properties>
Případně je to už nahozené i na doméně jelineku.aspone.cz Prosím kdo mi pomůže.
|