Register.aspx Page - Additional Validation

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
7/7/2011 1:38:11 AM
Gravatar
Total Posts 70

Register.aspx Page - Additional Validation

Joe,

I am trying to add validations upon Registration that when a user input same value on UserName and Password it will alert "Same Username and Password is not Allowed". I use OnTextChanged event and set autopostback="True".

Since Register.aspx does not include the code behind I place my code on the aspx page.

<script type="text/C#" runat="server">

</script>

I placed my code inside this script. There is a Textbox control for username and password. The problem is it returns an error "The name 'UserName' does not exist in the current context".

Your help is greatly appreciated.

Thanks.

 

Cesse

 

                            

7/7/2011 7:31:54 AM
Gravatar
Total Posts 18439

Re: Register.aspx Page - Additional Validation

I suggest don't fork the code

You can set a regular expression in Site Settings to control password allowed characters and you can set a regex expression in user.config to control user names

<add key="UserNameValidationExpression" value="" />

as long as you have different regex rules for passwords vs user names then they cannot be the same.

7/8/2011 2:09:24 AM
Gravatar
Total Posts 70

Re: Register.aspx Page - Additional Validation

Thanks Joe. 

 

I set password with minimum nonalphanumeric character 

then username to alphanumeric.

 

Thank you.

 

Cesse

You must sign in to post in the forums. This thread is closed to new posts.