Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
UI page for maintaining user Profile properties?
Message
 
 
To
10/09/2009 19:58:31
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01423538
Message ID:
01423567
Views:
22
>>In our website we designed our own web pages for that using some special CreateUser Wizard. I can take a look for more details if you want.
>
>I'll take any ideas, code, or help I can get on this one. Surely there is a UI-based manner to handle the Profile settings of a User. How else could anyone reasonably manage these settings for a user. Every example I've seen shows setting the values programmatically in code. I guess I just nee to build a form and read the values from the textboxes and then make the code calls to save changed. Maybe I'm making more to it that there really is.

Hi Matt,

This is some code from that page that managers creation of the user.
<asp:MultiView ID="MltvwUsers" runat="server" ActiveViewIndex="1">
                <asp:View ID="VwAddUsr" runat="server">
                    <br />
                    <div style="text-align: center;">
                        <asp:CreateUserWizard ID="AddUserWizard" runat="server" BackColor="#F7F7DE" BorderColor="#CCCC99"
                            BorderStyle="Solid" BorderWidth="1px" CompleteSuccessText="The account has been successfully created."
                            Font-Names="Verdana" Font-Size="10pt" UnknownErrorMessage="The account was not created. Please try again."
                            CreateUserButtonText="Next" FinishCompleteButtonText="Create User" LoginCreatedUser="False"
                            OnFinishButtonClick="AddUserWizard_FinishButtonClick" Width="416px" EmailRegularExpression="^[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z]{2,4}$"
                            TabIndex="7">
                            <WizardSteps>
                                <asp:CreateUserWizardStep runat="server" ID="SignUp">
                                    <ContentTemplate>
                                        <table border="0" style="font-size: 100%; width: 416px; font-family: Verdana">
                                            <tr>
                                                <td align="center" colspan="2" style="font-weight: bold; color: white; background-color: #6b696b">
                                                    Sign Up for Your New Account
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">User Name:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="UserName" runat="server" Height="22px" TabIndex="1" Width="155px"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
                                                        ValidationGroup="AddUserWizard" ErrorMessage="User Name is required." ToolTip="User Name is required.">*</asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="Password" runat="server" Height="22px" TabIndex="2" TextMode="Password"
                                                        Width="155px"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
                                                        ValidationGroup="AddUserWizard" ErrorMessage="Password is required." ToolTip="Password is required.">*</asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    <asp:Label ID="ConfirmPasswordLabel" runat="server" AssociatedControlID="ConfirmPassword">Confirm Password:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="ConfirmPassword" runat="server" Height="22px" TabIndex="3" TextMode="Password"
                                                        Width="155px"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="ConfirmPasswordRequired" runat="server" ControlToValidate="ConfirmPassword"
                                                        ValidationGroup="AddUserWizard" ErrorMessage="Confirm Password is required."
                                                        ToolTip="Confirm Password is required.">*</asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    <asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email">E-mail:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="Email" runat="server" Height="22px" TabIndex="4" Width="155px"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="EmailRequired" runat="server" ControlToValidate="Email"
                                                        ValidationGroup="AddUserWizard" ErrorMessage="E-mail is required." ToolTip="E-mail is required.">*</asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    <asp:Label ID="QuestionLabel" runat="server" AssociatedControlID="Question">Security Question:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="Question" runat="server" Height="22px" TabIndex="5" Width="155px"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="QuestionRequired" runat="server" ControlToValidate="Question"
                                                        ValidationGroup="AddUserWizard" ErrorMessage="Security question is required."
                                                        ToolTip="Security question is required.">*</asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    <asp:Label ID="AnswerLabel" runat="server" AssociatedControlID="Answer">Security Answer:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="Answer" runat="server" Height="22px" TabIndex="6" Width="155px"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="AnswerRequired" runat="server" ControlToValidate="Answer"
                                                        ValidationGroup="AddUserWizard" ErrorMessage="Security answer is required." ToolTip="Security answer is required.">*</asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="center" colspan="2">
                                                    <asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="Password"
                                                        ControlToValidate="ConfirmPassword" Display="Dynamic" ErrorMessage="The Password and Confirmation Password must match."></asp:CompareValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="center" colspan="2">
                                                    <asp:RegularExpressionValidator ID="EmailRegExp" runat="server" ControlToValidate="Email"
                                                        Display="Dynamic" ErrorMessage="Please enter a valid e-mail address." ValidationExpression="^[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z]{2,4}$"></asp:RegularExpressionValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="center" colspan="2" style="color: red">
                                                    <asp:Literal ID="ErrorMessage" runat="server" EnableViewState="False"></asp:Literal>
                                                </td>
                                            </tr>
                                        </table>
                                    </ContentTemplate>
                                </asp:CreateUserWizardStep>
                                <asp:WizardStep runat="server" Title="User Information" ID="StartUserInfo">
                                    <table border="0" style="font-size: 100%; font-family: Verdana" width="100%">
                                        <tr>
                                            <td align="center" colspan="2" style="font-weight: bold; color: white; background-color: #5d7b9d">
                                                Enter Administrator Information
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right" style="width: 109px; height: 53px;">
                                                First Name
                                            </td>
                                            <td align="left" style="height: 53px">
                                                <asp:TextBox ID="txtbFirstName" runat="server" Height="22px" Width="155px"></asp:TextBox>
                                                 
                                                <asp:RequiredFieldValidator ID="rqvldFirstName" ControlToValidate="txtbFirstName"
                                                    runat="server" Display="Dynamic" ErrorMessage="First Name Required.">*</asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right" style="width: 109px; height: 57px;">
                                                Middle Name
                                            </td>
                                            <td align="left" style="height: 57px">
                                                <asp:TextBox ID="txtbMiddleName" runat="server" Height="22px" Width="155px"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right" style="width: 109px; height: 49px;">
                                                Last Name
                                            </td>
                                            <td align="left" style="height: 49px">
                                                <asp:TextBox ID="txtbLastName" runat="server" Height="22px" Width="155px"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="rqvldLastName" ControlToValidate="txtbLastName" runat="server"
                                                    Display="Dynamic" ErrorMessage="Last Name Required.">*</asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right" style="width: 109px; height: 43px;">
                                                Job Title
                                            </td>
                                            <td align="left" style="height: 43px">
                                                <asp:TextBox ID="txtbJobTitle" runat="server" Height="22px" Width="155px"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right" style="height: 53px; width: 109px;">
                                                Telephone
                                            </td>
                                            <td align="left" style="height: 53px">
                                                <asp:TextBox ID="txtbTelephone" runat="server" Height="22px" Width="155px"></asp:TextBox>
                                                   
                                                <asp:RegularExpressionValidator ID="regexvldTelephone" ControlToValidate="txtbTelephone"
                                                    runat="server" Display="Dynamic" ErrorMessage="Proper telephone number required (ex. (770)123-4567 x1234)."
                                                    ValidationExpression="((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}( x\d{0,})?">*</asp:RegularExpressionValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="center" colspan="2">
                                                <asp:ValidationSummary ID="ValidationSummary1" runat="server" DisplayMode="List" />
                                            </td>
                                        </tr>
                                    </table>
                                </asp:WizardStep>
                                <asp:CompleteWizardStep runat="server" ID="CompleteUserCreation">
                                    <ContentTemplate>
                                        <table border="0" style="font-size: 100%; font-family: Verdana">
                                            <tr>
                                                <td align="center" colspan="2" style="font-weight: bold; color: white; background-color: #5d7b9d;
                                                    height: 18px;">
                                                    Complete
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    The account has been successfully created.
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right" colspan="2">
                                                </td>
                                            </tr>
                                        </table>
                                    </ContentTemplate>
                                </asp:CompleteWizardStep>
                            </WizardSteps>
                            <SideBarStyle BackColor="#7C6F57" BorderWidth="0px" Font-Size="0.9em" VerticalAlign="Top" />
                            <TitleTextStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                            <SideBarButtonStyle BorderWidth="0px" Font-Names="Verdana" ForeColor="White" />
                            <NavigationButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" BorderStyle="Solid"
                                BorderWidth="1px" Font-Names="Verdana" ForeColor="#284775" />
                            <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" />
                            <CreateUserButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" BorderStyle="Solid"
                                BorderWidth="1px" Font-Names="Verdana" ForeColor="#284775" />
                            <ContinueButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" BorderStyle="Solid"
                                BorderWidth="1px" Font-Names="Verdana" ForeColor="#284775" />
                            <StepStyle BorderWidth="0px" />
                        </asp:CreateUserWizard>
                    </div>
                      
                </asp:View>
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform