I have tried to set EnableViewStateMac to false but sometime the aspx page still gets the Invalid ViewState error. Modifying machine.config is impossible in this case. Don't know what to do. Please help!
Here is the ASPX code:
<%# Page Language="C#" MasterPageFile="~/CommonPage.Master" Codebehind="Register.aspx.cs" EnableViewStateMac="false"
Inherits="xxxxxxxx.Register" Title="Create a new Account" %>
<%# Register TagPrefix="usc" Namespace="xxxxxx" Assembly="xxxxxxxx" %>
<%# Register Assembly="RadComboBox.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
<asp:Content ID="c" ContentPlaceHolderID="content" runat="Server">
<div class="t_padleft">
<div class="t_failure" runat="server" visible="False" id="divFailure"></div>
<div class="t_success" runat="server" visible="False" id="divSuccess"></div>
<asp:PlaceHolder ID="phRegister" runat="server">
<h2 class="top">
Login Information</h2>
<table class="form">
<tr>
<td class="lbl">
Your Email</td>
<td class="field">
<asp:TextBox ID="txtEmail" runat="server" CssClass="txt"></asp:TextBox>
</td>
</tr>
<tr>
<td>
</td>
<td>
<asp:RequiredFieldValidator ID="rfvEmail" runat="server" ControlToValidate="txtEmail"
Display="Dynamic" ErrorMessage="Please enter your e-mail address."></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="revEmail" runat="server" ValidationExpression="\w+([-+.]\w+)*#\w+([-.]\w+)*\.\w+([-.]\w+)*"
ControlToValidate="txtEmail" Display="Dynamic" ErrorMessage="E-mail address is invalid."></asp:RegularExpressionValidator></td>
</tr>
<tr>
<td class="lbl">
Password</td>
<td class="field">
<asp:TextBox ID="txtPassword" TextMode="Password" runat="server" CssClass="txt"></asp:TextBox></td>
</tr>
<tr>
<td>
</td>
<td>
<asp:RegularExpressionValidator id="revPasswordIsInvalid" runat="server" ErrorMessage="Accepted characters are: a->z, A->Z, _, and 0->9.<br />Password's length must be between 5 to 40"
ControlToValidate="txtPassword" ValidationExpression="\w{5,40}" Display="Dynamic"></asp:RegularExpressionValidator>
<asp:RequiredFieldValidator ID="rfvPass" runat="server" ControlToValidate="txtPassword"
Display="Dynamic" ErrorMessage="Please enter password."></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td class="lbl">
Verify Password</td>
<td class="field">
<asp:TextBox ID="txtVerifyPassword" TextMode="Password" runat="server" CssClass="txt"></asp:TextBox></td>
</tr>
<tr>
<td>
</td>
<td>
<asp:CompareValidator id="cvInvalidConfirmPassword" runat="server" ErrorMessage="The Verify Password does not match the Password"
ControlToValidate="txtVerifyPassword" ControlToCompare="txtPassword" Display="Dynamic"></asp:CompareValidator>
<asp:RequiredFieldValidator ID="rfvConfirm" runat="server" ControlToValidate="txtVerifyPassword"
Display="Dynamic" ErrorMessage="Please enter confirm password."></asp:RequiredFieldValidator>
</td>
</tr>
</table>
<h2>
Your Personal Information</h2>
<table class="form">
<tr>
<td class="lbl">
First Name</td>
<td class="field">
<asp:TextBox ID="txtFirstName" runat="server" CssClass="txt"></asp:TextBox>
</td>
</tr>
<tr>
<td>
</td>
<td>
<asp:RequiredFieldValidator ID="rfvFirstName" runat="server" ControlToValidate="txtFirstName"
Display="Dynamic" ErrorMessage="Please enter your first name."></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td class="lbl">
Last Name</td>
<td class="field">
<asp:TextBox ID="txtLastName" runat="server" CssClass="txt"></asp:TextBox></td>
</tr>
<tr>
<td>
</td>
<td>
<asp:RequiredFieldValidator ID="rfvLastName" runat="server" ControlToValidate="txtLastName"
Display="Dynamic" ErrorMessage="Please enter your last name."></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td class="lbl">
Country</td>
<td class="field">
<rad:RadComboBox ID="cbxCountry" runat="server" Width="336px" Height="150px" MarkFirstMatch="true" Skin="UltimateBlack" OffsetX="2"></rad:RadComboBox>
</td>
</tr>
<tr style="padding-top: 4px">
<td class="lblnotrequired">
Company Name</td>
<td class="fieldnotrequired">
<asp:TextBox ID="txtCompany" runat="server" CssClass="txt"></asp:TextBox></td>
</tr>
<tr>
<td class="lbl">
Time Zone</td>
<td class="field">
<rad:RadComboBox ID="cbxTimeZone" runat="server" Width="336px" Height="150px" MarkFirstMatch="true" Skin="UltimateBlack" OffsetX="2"></rad:RadComboBox>
</td>
</tr>
<tr>
<td>
</td>
<td class="formbtn">
<asp:Button ID="btnRegister" runat="server" OnClick="btnRegister_Click" CssClass="btn"
Text="Register" /></td>
</tr>
</table>
</asp:PlaceHolder>
</div>
</asp:Content>
Maybe it will help (us), if you post a example code, e.g. where you are setting EnableViewStateMac.
But for now, it looks like, your field is not correctly initiated, so instead of true/false it has the value "null". But it´s just a guess, recommending more is quiet impossible for now. ;)
I've gotten invalid viewstate errors before, and in researching, I think for me the issue was happening is in one of my really large pages. I read somewhere that really large pages can have that issue happen, for a reason I now forget...
Related
Alright, I have a login page (occurs in register page too) and when I press enter after typing my password to login, it redirects me to the default page but won't do anything else - But when I click the login button, it would login successfully. Why it is happening? Is there a way around it, fixing it?
For example, this is my login.aspx page:
<%# Page Title="התחברות" Language="C#" MasterPageFile="~/MasterPageTest.master" AutoEventWireup="true" CodeFile="login.aspx.cs" Inherits="login" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<br />
<center><b>
<asp:Login ID="Login1" runat="server"
LoginButtonText="התחבר" PasswordLabelText="סיסמא:" TitleText="<u><font size=4>התחברות</font></u>"
UserNameLabelText="שם משתמש:" RememberMeText="זכור אותי"
TextLayout="TextOnTop">
<LayoutTemplate>
<table cellpadding="1" cellspacing="0" style="border-collapse:collapse;" dir="rtl">
<tr>
<td>
<table cellpadding="0">
<tr>
<td align="center">
<u><font size="4">התחברות</font></u></td>
</tr>
<tr>
<td>
<asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">שם משתמש:</asp:Label>
</td>
</tr>
<tr>
<td>
<asp:TextBox ID="UserName" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="UserNameRequired" runat="server"
ControlToValidate="UserName" ErrorMessage="User Name is required."
ToolTip="User Name is required." ValidationGroup="Login1"><font color="red">*</font></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
<asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">סיסמא:</asp:Label>
</td>
</tr>
<tr>
<td>
<asp:TextBox ID="Password" runat="server" TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidator ID="PasswordRequired" runat="server"
ControlToValidate="Password" ErrorMessage="Password is required."
ToolTip="Password is required." ValidationGroup="Login1"><font color="red">*</font></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
<asp:CheckBox ID="RememberMe" runat="server" Text="זכור אותי" />
</td>
</tr>
<tr>
<td align="center" style="color:Red;">
<asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
</td>
</tr>
<tr>
<td align="right">
<asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="התחבר"
ValidationGroup="Login1" />
<br />
<asp:LinkButton ID="ForgotPassLnk" runat="server" Text="שכחתי סיסמא" OnClick="ForgotPassLnk_Click"></asp:LinkButton>
</td>
</tr>
</table>
</td>
</tr>
</table>
</LayoutTemplate>
</asp:Login>
</b></center>
</asp:Content>
One solution will be:
<asp:TextBox ID="Password" runat="server" TextMode="Password" onkeypress="return EnterEvent(event)"></asp:TextBox>
js
function EnterEvent(e) {
if (e.keyCode == 13) {
//login code
}
}
I want to create a login with ASP.NET 4 but without rememberMe check box. Is any way to do this?
Take a look at this
If you are using that control, you just need to put something like below in your aspx file:
<asp:Login DisplayRememberMe="False" />
Press the drop down menu and press Convert To Template. And then just delete it.
In addition, there is a property which is DisplayRememberMe you can just put it false.
You can do this just by using property of login control to control the display of RememberMe
for that you have to set that property equals to false
<asp:Login ID="Login1" runat="server" DisplayRememberMe="false">
</asp:Login>
or you can also convert this into template and can remove whatever items you don't want to use. by default template control look like this . you can remove remember me from this HTML .
<asp:Login ID="Login1" runat="server" DisplayRememberMe="false">
<LayoutTemplate>
<table cellpadding="1" cellspacing="0" style="border-collapse:collapse;">
<tr>
<td>
<table cellpadding="0">
<tr>
<td align="center" colspan="2">
Log In</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"></asp:TextBox>
<asp:RequiredFieldValidator ID="UserNameRequired" runat="server"
ControlToValidate="UserName" ErrorMessage="User Name is required."
ToolTip="User Name is required." ValidationGroup="Login1">*</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" TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidator ID="PasswordRequired" runat="server"
ControlToValidate="Password" ErrorMessage="Password is required."
ToolTip="Password is required." ValidationGroup="Login1">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="center" colspan="2" style="color:Red;">
<asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
</td>
</tr>
<tr>
<td align="right" colspan="2">
<asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="Log In"
ValidationGroup="Login1" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</LayoutTemplate>
</asp:Login>
I've got this here wizard step with a couple of text boxes. For some reason I cannot highlight/select the text in the textbox in IE or FF and I have no idea why, not even after spending a couple of hours googling the problem. I could really use another set of eyes on this. Let me know if you need more code to help.
<asp:WizardStep ID="wsPlanInfo" runat="server" Title="" StepType="Step">
<div style="width:100%; height:290px; margin-top:150px ">
<table border="0" style="margin:0 auto;">
<tr>
<td colspan="2" class="title">
Placeholder text here?
</td>
</tr>
<tr>
<td colspan="2"><asp:TextBox runat="server" ID="txtLearningPlanName" Width="300px" CssClass="input-text" /> <asp:RequiredFieldValidator runat="server" ID="rflLearningPlanName" ControlToValidate="txtLearningPlanName" ErrorMessage="*" CssClass="validator" /><br /><br /></td>
</tr>
<tr>
<td colspan="2" class="title">
placeholder text here?
</td>
</tr>
<tr>
<td> </td>
<td>
<table border="0"><tr><td><asp:RadioButton runat="server" ID="rbSpecificDate" GroupName="DeadlinePicker" Checked="true" /></td><td><UC:DatePicker runat="server" ID="ucSpecificDatePicker" RequiredField="false" /></td></tr></table>
</td>
</tr>
<tr>
<td> </td>
<td>
<asp:RadioButton runat="server" ID="rbCustomUserFieldPlusDays" GroupName="DeadlinePicker" /> <asp:DropDownList runat="server" ID="ddlUserCustomFields" CssClass="input-text" /> plus <Telerik:RadNumericTextBox runat="server" SkinID="Normal" ID="rntbUserCustomFieldOffset" ShowSpinButtons="true" DataType="System.Int32" NumberFormat-DecimalDigits="0" Width="60px" Value="365" /> days
</td>
</tr>
<tr>
<td> </td>
<td>
<asp:RadioButton runat="server" ID="rbPlusDays" GroupName="DeadlinePicker" /> <Telerik:RadNumericTextBox runat="server" SkinID="Normal" ID="rntbPlusDays" ShowSpinButtons="true" DataType="System.Int32" NumberFormat-DecimalDigits="0" Width="60px" Value="365" /> days from today
</td>
</tr>
<tr>
<td> </td>
<td>
<asp:RadioButton runat="server" ID="rbNone" GroupName="DeadlinePicker" /> None
</td>
</tr>
</table>
</div>
</asp:WizardStep>
Try:
((TextBox)wsPlanInfo.FindControl("txtLearningPlanName")).Text
It will search the Wizard Step's Control list for a textbox with that ID name. It then casts it as a TextBox and so you can then use the Text property.
Removing disableSelection(document.body) in my javascript solved my problem. Note to self, post entire code when asking a question.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Is it possible to line up the "Register" button to right align it w/in col2?
Here's the markup:
<asp:CreateUserWizard ID="CreateUserWizard1" runat="server" CreateUserButtonText="Register" ContinueDestinationPageUrl="~/Secure/PromotePandaVisa.aspx">
<SideBarTemplate>
Sidebar template
</SideBarTemplate>
<WizardSteps>
<asp:CreateUserWizardStep runat="server">
<ContentTemplate>
<table border="0" cellpadding="2" cellspacing="2">
<colgroup>
<col width="120px"/>
<col width="150px" />
<col />
<tr>
<td class="CaptionLabel" colspan="3" style="white-space: nowrap; padding-left:10px; padding-top: 5px; padding-bottom: 15px;">
<asp:Label ID="Label1" runat="server" CssClass="LargeCaption LightText" Text="Register as an Affiliate"></asp:Label>
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName" CssClass="DefaultLabelCaption">User Name:</asp:Label>
</td>
<td>
<asp:TextBox ID="UserName" runat="server" CssClass="DefaultTextBox TextboxWidth"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName" Display="Dynamic" ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="CreateUserWizard1">Required</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password" CssClass="DefaultLabelCaption">Password:</asp:Label>
</td>
<td>
<asp:TextBox ID="Password" runat="server" CssClass="DefaultTextBox TextboxWidth" TextMode="Password"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password" Display="Dynamic" ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="CreateUserWizard1">Required</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="ConfirmPasswordLabel" runat="server" AssociatedControlID="ConfirmPassword" CssClass="DefaultLabelCaption">Confirm Password:</asp:Label>
</td>
<td>
<asp:TextBox ID="ConfirmPassword" runat="server" CssClass="DefaultTextBox TextboxWidth" TextMode="Password"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="ConfirmPasswordRequired" runat="server" ControlToValidate="ConfirmPassword" Display="Dynamic" ErrorMessage="Confirm Password is required." ToolTip="Confirm Password is required." ValidationGroup="CreateUserWizard1">Required</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email" CssClass="DefaultLabelCaption">E-mail:</asp:Label>
</td>
<td>
<asp:TextBox ID="Email" runat="server" CssClass="DefaultTextBox TextboxWidth"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="EmailRequired" runat="server" ControlToValidate="Email" Display="Dynamic" ErrorMessage="E-mail is required." ToolTip="E-mail is required." ValidationGroup="CreateUserWizard1">Required</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="AnswerLabel1" runat="server" AssociatedControlID="Answer" CssClass="DefaultLabelCaption">Company Name:</asp:Label>
</td>
<td>
<asp:TextBox ID="txtCompanyName" runat="server" CssClass="DefaultTextBox TextboxWidth"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="AnswerRequired1" runat="server" ControlToValidate="txtCompanyName" Display="Dynamic" ErrorMessage="Security answer is required." SetFocusOnError="True" ToolTip="Security answer is required." ValidationGroup="CreateUserWizard1">Required</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="AnswerLabel0" runat="server" AssociatedControlID="Answer" CssClass="DefaultLabelCaption">Website:</asp:Label>
</td>
<td>
<asp:TextBox ID="txtWebsite" runat="server" CssClass="DefaultTextBox TextboxWidth"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="AnswerRequired0" runat="server" ControlToValidate="txtWebsite" Display="Dynamic" ErrorMessage="Security answer is required." SetFocusOnError="True" ToolTip="Security answer is required." ValidationGroup="CreateUserWizard1">Required</asp:RequiredFieldValidator>
</td>
</tr>
<tr style="display: none;">
<td align="right">
<asp:Label ID="QuestionLabel" runat="server" AssociatedControlID="Question" CssClass="DefaultLabelCaption">Security Question:</asp:Label>
</td>
<td>
<asp:TextBox ID="Question" runat="server" CssClass="DefaultTextBox TextboxWidth"></asp:TextBox>
</td>
<td>
</td>
</tr>
<tr style="display: none;">
<td align="right">
<asp:Label ID="AnswerLabel" runat="server" AssociatedControlID="Answer" CssClass="DefaultLabelCaption">Security Answer:</asp:Label>
</td>
<td>
<asp:TextBox ID="Answer" runat="server" CssClass="DefaultTextBox TextboxWidth"></asp:TextBox>
</td>
<td>
</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." ValidationGroup="CreateUserWizard1"></asp:CompareValidator>
</td>
<td align="center">
</td>
</tr>
<tr>
<td align="center" colspan="2" style="color: Red;">
<asp:Literal ID="ErrorMessage" runat="server" EnableViewState="False"></asp:Literal>
</td>
<td align="center" style="color: Red;">
</td>
</tr>
</colgroup>
</table>
</ContentTemplate>
</asp:CreateUserWizardStep>
<asp:CompleteWizardStep runat="server">
<ContentTemplate>
<table border="0">
<tr>
<td align="center">
Complete
</td>
</tr>
<tr>
<td>
Your account has been successfully created.
</td>
</tr>
<tr>
<td align="right">
<asp:Button ID="ContinueButton" runat="server" CausesValidation="False" CommandName="Continue" Text="Continue" ValidationGroup="CreateUserWizard1" OnPreRender="StepNextButton_PreRender" />
</td>
</tr>
</table>
</ContentTemplate>
</asp:CompleteWizardStep>
</WizardSteps>
</asp:CreateUserWizard>
Here's the Design View:
I'd like to add code in the code behind to perform additional edits. I added the "ErrorMessage" LiteralControl. How do I access it from the code behind or is there a preffered way to display a custom message using the control's functionality?
Suggest using the CreateUserWizard property CreateUserButtonStyle-CssClass.
Define yourself a new class:
<style type="text/css">
.foo{
margin-left: 120px;
}
</style>
Then set the wizard button property:
<asp:CreateUserWizard CreateUserButtonStyle-CssClass="foo"
The only problem is that the markup emitted has the alignment as "right" instead of what we want: "left".
See this image for a look in Firebug if the table cell alignment was set to LEFT.
Solve the right/left <td> contents alignment problem, and you're set!
Use jQuery to find this button, get its parent <td>, and set its align attribute to left.
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<style type="text/css">
.foo
{
margin-left: 120px;
}
</style>
<script type="text/javascript">
$(document).ready(function () {
var btn = $("#CreateUserWizard1___CustomNav0_StepNextButtonButton");
btn.parent().attr('align', 'left');
});
</script>
<head>
Repro of this setup at: http://pastebin.org/698287
Here's how it renders:
I have a text box that is intended for an Email address. I am using a Regular eExppression validation control to validate the email address.
When I place the following lines of code in a blank web Form, the validator works properly.
<asp:TextBox ID="Email" runat="server" CssClass="DefaultTextBox TextboxWidth" MaxLength="80"></asp:TextBox>
<asp:RegularExpressionValidator ID="valEmail" runat="server" ControlToValidate="Email" ErrorMessage="Invalid Email address" SetFocusOnError="True" ToolTip="Invalid Email address" ValidationExpression="\w+([-+.']\w+)*#\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator`>
However, when I use the validation control within a CreateUserWizard control, it does not seem to fire but other validation controls (Required and Custom validators) do fire, but not the regular expression validator above for validating the address.
The following is my complete web page. The two controls above appear unchanged in the code below, they are simply embedded into the wizard control mentioned.
<%# Page Title="" Language="VB" MasterPageFile="~/Master Pages/MasterPage.master" AutoEventWireup="false" CodeFile="Login.aspx.vb" Inherits="Login" %>
<%# MasterType VirtualPath="~/Master Pages/MasterPage.master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
<style type="text/css">
.TextboxWidth
{
width: 200px;
}
.Heading
{
font-weight: bold;
font-size: 12pt;
color: rgb(44, 68, 105);
}
.StdFrameWidth
{
width: 350px;
}
.StdTableWidth
{
width: 750px;
}
</style>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="phPageContent" runat="Server">
<div style="margin-left: 10px; margin-top: 30px;">
<h1 style="text-align: left;">
Affiliate Program</h1>
<div class="LightText">
</div>
<hr />
<asp:ValidationSummary ID="ValidationSummary2" runat="server" ValidationGroup="Login1" />
</div>
<table class="StdTableWidth">
<tr>
<td style="padding-top: 10px; padding-left: 20px; padding-right: 20px; vertical-align: top;">
<div>
<div>
Some General high-level bullshit about the Affiliate program.</div>
</div>
</td>
<td>
<fieldset>
<legend class="StdFrameWidth StdLegend">Already an Affiliate?</legend>
<asp:Login ID="Login1" runat="server" CreateUserText="Register" DestinationPageUrl="~/Secure/AffiliateDefault.aspx" FailureText="Unsuccessful login. Please try again.">
<LayoutTemplate>
<table cellpadding="2" cellspacing="2" style="border-collapse: collapse; margin-top: 15px;">
<colgroup>
</colgroup>
<tr>
<td align="right" style="white-space: nowrap;">
<asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName" CssClass="LightText">User Name:</asp:Label>
</td>
<td>
<asp:TextBox ID="UserName" runat="server" CssClass="DefaultTextBox TextboxWidth"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName" ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="Login1">Required</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password" CssClass="LightText">Password:</asp:Label>
</td>
<td>
<asp:TextBox ID="Password" runat="server" CssClass="DefaultTextBox TextboxWidth" TextMode="Password"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password" ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="Login1" SetFocusOnError="True">Required</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td>
</td>
<tr>
<td colspan="2" style="text-align: right;">
<asp:CheckBox ID="RememberMe" runat="server" CssClass="LightText" Text="Remember me next time." />
</td>
<td>
</td>
</tr>
<tr>
<td align="center" colspan="2" style="color: Red;">
<asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
</td>
<td align="center" style="color: Red;">
</td>
</tr>
<tr>
<td align="right" colspan="2">
<asp:Button ID="LoginButton" runat="server" CommandName="Login" OnPreRender="LoginButton_PreRender" Text="Log In" ValidationGroup="Login1" />
</td>
<td align="right">
</td>
</tr>
</tr>
</table>
</LayoutTemplate>
</asp:Login>
</fieldset>
</td>
</tr>
</table>
<table bgcolor="#F7F7F7" class="StdTableWidth">
<tr>
<td style="padding-top: 10px; padding-left: 20px; padding-right: 20px; vertical-align: top;">
<div>
<div class="Heading">
Heading
</div>
<div>
Body dk dfljdsf lksdjf ldskfj dslkfj sdlfkjds flkjsdf lksdjf lsdkfj sdlfkj sdlfkjsd flkjsd flkdsjf lkdsjf lksdjf lsdkjf dslfkj sdlfkjs dlfkjdsf
</div>
<div class="Heading" style="margin-top: 20px;">
Heading
</div>
<div>
Body dk dfljdsf lksdjf ldskfj dslkfj sdlfkjds flkjsdf lksdjf lsdkfj sdlfkj sdlfkjsd flkjsd flkdsjf lkdsjf lksdjf lsdkjf dslfkj sdlfkjs dlfkjdsf
</div>
</div>
</td>
<td style="vertical-align: top;">
<fieldset style="background-color: #FFFFFF;">
<legend class="StdFrameWidth StdLegend">Affiliate Program Registration</legend>
<asp:CreateUserWizard ID="CreateUserWizard1" runat="server" Style="margin-top: 10px;" CreateUserButtonText="Register" ContinueDestinationPageUrl="~/Secure/AffiliateDefault.aspx" BorderColor="Gray" BorderStyle="None" CellPadding="5">
<SideBarTemplate>
Sidebar template
</SideBarTemplate>
<CreateUserButtonStyle CssClass="RegisterButtonClass" />
<WizardSteps>
<asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server">
<ContentTemplate>
<table border="0" cellpadding="2" cellspacing="2">
<colgroup>
<col width="150px" />
<col width="150px" />
<col />
</colgroup>
<tr>
<td align="right">
<asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName" CssClass="DefaultLabelCaption">Create User Name:</asp:Label>
</td>
<td>
<asp:TextBox ID="UserName" runat="server" CssClass="DefaultTextBox TextboxWidth" MaxLength="25"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName" ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="CreateUserWizard1" SetFocusOnError="True">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password" CssClass="DefaultLabelCaption">Password:</asp:Label>
</td>
<td>
<asp:TextBox ID="Password" runat="server" CssClass="DefaultTextBox TextboxWidth" TextMode="Password"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password" Display="Dynamic" ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="CreateUserWizard1" SetFocusOnError="True">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="ConfirmPasswordLabel" runat="server" AssociatedControlID="ConfirmPassword" CssClass="DefaultLabelCaption">Confirm Password:</asp:Label>
</td>
<td>
<asp:TextBox ID="ConfirmPassword" runat="server" CssClass="DefaultTextBox TextboxWidth" TextMode="Password" MaxLength="25"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="ConfirmPasswordRequired" runat="server" ControlToValidate="ConfirmPassword" Display="Dynamic" ErrorMessage="Confirm Password is required." ToolTip="Confirm Password is required." ValidationGroup="CreateUserWizard1" SetFocusOnError="True">*</asp:RequiredFieldValidator>
<asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="Password" ControlToValidate="ConfirmPassword" Display="Dynamic" ErrorMessage="The Password and Confirmation Password must match." SetFocusOnError="True" ValidationGroup="CreateUserWizard1">*</asp:CompareValidator>
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="EmailLabel0" runat="server" AssociatedControlID="txtFirstName" CssClass="DefaultLabelCaption">First Name:</asp:Label>
</td>
<td>
<asp:TextBox ID="txtFirstName" runat="server" CssClass="DefaultTextBox TextboxWidth" MaxLength="25"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="FirstNameRequired" runat="server" ControlToValidate="txtFirstName" Display="Dynamic" ErrorMessage="First Name is required." ToolTip="First Name is required" ValidationGroup="CreateUserWizard1" SetFocusOnError="True">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="EmailLabel1" runat="server" AssociatedControlID="txtLastName" CssClass="DefaultLabelCaption">Last Name:</asp:Label>
</td>
<td>
<asp:TextBox ID="txtLastName" runat="server" CssClass="DefaultTextBox TextboxWidth" MaxLength="30"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="LastNameRequired" runat="server" ControlToValidate="txtLastName" Display="Dynamic" ErrorMessage="Last Name is required." ToolTip="Last Name is required." ValidationGroup="CreateUserWizard1" SetFocusOnError="True">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email" CssClass="DefaultLabelCaption">E-mail:</asp:Label>
</td>
<td>
<asp:TextBox ID="Email" runat="server" CssClass="DefaultTextBox TextboxWidth" MaxLength="80"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="EmailRequired" runat="server" ControlToValidate="Email" Display="Dynamic" ErrorMessage="E-mail is required." ToolTip="E-mail is required." ValidationGroup="CreateUserWizard1" SetFocusOnError="True">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="valEmail" runat="server" ControlToValidate="Email" ErrorMessage="Invalid Email address" SetFocusOnError="True" ToolTip="Invalid Email address" ValidationExpression="\w+([-+.']\w+)*#\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td align="right">
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="CompanyLabel" runat="server" AssociatedControlID="txtCompanyName" CssClass="DefaultLabelCaption">Company Name:</asp:Label>
</td>
<td>
<asp:TextBox ID="txtCompanyName" runat="server" CssClass="DefaultTextBox TextboxWidth" MaxLength="80"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="CompanyNameRequired" runat="server" ControlToValidate="txtCompanyName" Display="Dynamic" ErrorMessage="Company Name is required." SetFocusOnError="True" ToolTip="Company Name is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="AnswerLabel0" runat="server" AssociatedControlID="Answer" CssClass="DefaultLabelCaption">Website URL:</asp:Label>
</td>
<td>
<asp:TextBox ID="txtWebsiteUrl" runat="server" CssClass="DefaultTextBox TextboxWidth" MaxLength="256"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="WebsiteUrlRequired" runat="server" ControlToValidate="txtWebsiteUrl" Display="Dynamic" ErrorMessage="Website URL is required." SetFocusOnError="True" ToolTip="Company Website URL is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
<asp:CustomValidator ID="cvalWebsiteUrl" runat="server" ControlToValidate="txtWebsiteUrl" ErrorMessage="Company Website URL has already been registered." onservervalidate="cvalWebsiteUrl_ServerValidate" SetFocusOnError="True" ToolTip="Company Website URL has already been registered." ValidationGroup="CreateUserWizard1">*</asp:CustomValidator>
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="TaxIdLabel" runat="server" AssociatedControlID="txtTaxId" CssClass="DefaultLabelCaption">Tax ID:</asp:Label>
</td>
<td>
<asp:TextBox ID="txtTaxId" runat="server" CssClass="DefaultTextBox TextboxWidth" MaxLength="30"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="TaxIdRequired" runat="server" ControlToValidate="txtTaxId" Display="Dynamic" ErrorMessage="Tax ID is required." SetFocusOnError="True" ToolTip="Tax ID is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
<asp:CustomValidator ID="cvalTaxId" runat="server" ErrorMessage="Tax ID has already been registered." onservervalidate="cvalTaxId_ServerValidate" ControlToValidate="txtTaxId" SetFocusOnError="True" ValidationGroup="CreateUserWizard1" >*</asp:CustomValidator>
</td>
</tr>
<tr style="display: none;">
<td align="right">
<asp:Label ID="QuestionLabel" runat="server" AssociatedControlID="Question" CssClass="DefaultLabelCaption">Security Question:</asp:Label>
</td>
<td>
<asp:TextBox ID="Question" runat="server" CssClass="DefaultTextBox TextboxWidth"></asp:TextBox>
</td>
<td>
</td>
</tr>
<tr style="display: none;">
<td align="right">
<asp:Label ID="AnswerLabel" runat="server" AssociatedControlID="Answer" CssClass="DefaultLabelCaption">Security Answer:</asp:Label>
</td>
<td>
<asp:TextBox ID="Answer" runat="server" CssClass="DefaultTextBox TextboxWidth"></asp:TextBox>
</td>
<td>
</td>
</tr>
<tr>
<td align="center" colspan="2">
</td>
<td align="center">
</td>
</tr>
<tr>
<td align="center" colspan="2" style="color: Red;">
<asp:Literal ID="ErrorMessage" runat="server" EnableViewState="False"></asp:Literal>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ValidationGroup="CreateUserWizard1" />
</td>
<td align="center" style="color: Red;">
</td>
</tr>
</table>
</ContentTemplate>
</asp:CreateUserWizardStep>
<asp:CompleteWizardStep ID="CompleteWizardStep1" runat="server">
<ContentTemplate>
<table border="0">
<tr>
<td align="center">
Complete
</td>
</tr>
<tr>
<td>
Your account has been successfully created.
</td>
</tr>
<tr>
<td align="right">
<asp:Button ID="ContinueButton" runat="server" CausesValidation="False" CommandName="Continue" Text="Continue" ValidationGroup="CreateUserWizard1" OnPreRender="StepNextButton_PreRender" />
</td>
</tr>
</table>
</ContentTemplate>
</asp:CompleteWizardStep>
</WizardSteps>
</asp:CreateUserWizard>
</fieldset>
</td>
</tr>
</table>
</asp:Content>
Why would only this validation stop working?
Change the validation group top match that used by other validation controls in the wizard: "CreateUserWizard1"