Invalid VIewState in ASP.NET page
<p>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!</p>

<p>Here is the ASPX code:</p>

<pre><code>&lt;%@ Page Language="C#" MasterPageFile="~/CommonPage.Master" Codebehind="Register.aspx.cs" EnableViewStateMac="false"
    Inherits="xxxxxxxx.Register" Title="Create a new Account" %&gt;

&lt;%@ Register TagPrefix="usc" Namespace="xxxxxx" Assembly="xxxxxxxx" %&gt;
&lt;%@ Register Assembly="RadComboBox.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %&gt;
&lt;asp:Content ID="c" ContentPlaceHolderID="content" runat="Server"&gt;
&lt;div class="t_padleft"&gt;
    &lt;div class="t_failure" runat="server" visible="False" id="divFailure"&gt;&lt;/div&gt;
    &lt;div class="t_success" runat="server" visible="False" id="divSuccess"&gt;&lt;/div&gt;
    &lt;asp:PlaceHolder ID="phRegister" runat="server"&gt;
    &lt;h2 class="top"&gt;
        Login Information&lt;/h2&gt;
    &lt;table class="form"&gt;
        &lt;tr&gt;
            &lt;td class="lbl"&gt;
                Your Email&lt;/td&gt;
            &lt;td class="field"&gt;
                &lt;asp:TextBox ID="txtEmail" runat="server" CssClass="txt"&gt;&lt;/asp:TextBox&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;
            &lt;/td&gt;
            &lt;td&gt;
                &lt;asp:RequiredFieldValidator ID="rfvEmail" runat="server" ControlToValidate="txtEmail"
                    Display="Dynamic" ErrorMessage="Please enter your e-mail address."&gt;&lt;/asp:RequiredFieldValidator&gt;
                &lt;asp:RegularExpressionValidator ID="revEmail" runat="server" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                    ControlToValidate="txtEmail" Display="Dynamic" ErrorMessage="E-mail address is invalid."&gt;&lt;/asp:RegularExpressionValidator&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td class="lbl"&gt;
                Password&lt;/td&gt;
            &lt;td class="field"&gt;
                &lt;asp:TextBox ID="txtPassword" TextMode="Password" runat="server" CssClass="txt"&gt;&lt;/asp:TextBox&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;
            &lt;/td&gt;
            &lt;td&gt;
                &lt;asp:RegularExpressionValidator id="revPasswordIsInvalid" runat="server" ErrorMessage="Accepted characters are: a-&gt;z, A-&gt;Z, _, and 0-&gt;9.&lt;br /&gt;Password's length must be between 5 to 40"
                                                    ControlToValidate="txtPassword" ValidationExpression="\w{5,40}" Display="Dynamic"&gt;&lt;/asp:RegularExpressionValidator&gt;
                &lt;asp:RequiredFieldValidator ID="rfvPass" runat="server" ControlToValidate="txtPassword"
                    Display="Dynamic" ErrorMessage="Please enter password."&gt;&lt;/asp:RequiredFieldValidator&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td class="lbl"&gt;
                Verify Password&lt;/td&gt;
            &lt;td class="field"&gt;
                &lt;asp:TextBox ID="txtVerifyPassword" TextMode="Password" runat="server" CssClass="txt"&gt;&lt;/asp:TextBox&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;
            &lt;/td&gt;
            &lt;td&gt;
                &lt;asp:CompareValidator id="cvInvalidConfirmPassword" runat="server" ErrorMessage="The Verify Password does not match the Password"
                  ControlToValidate="txtVerifyPassword" ControlToCompare="txtPassword" Display="Dynamic"&gt;&lt;/asp:CompareValidator&gt;
                &lt;asp:RequiredFieldValidator ID="rfvConfirm" runat="server" ControlToValidate="txtVerifyPassword"
                    Display="Dynamic" ErrorMessage="Please enter confirm password."&gt;&lt;/asp:RequiredFieldValidator&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/table&gt;
    &lt;h2&gt;
        Your Personal Information&lt;/h2&gt;
    &lt;table class="form"&gt;
        &lt;tr&gt;
            &lt;td class="lbl"&gt;
                First Name&lt;/td&gt;
            &lt;td class="field"&gt;
                &lt;asp:TextBox ID="txtFirstName" runat="server" CssClass="txt"&gt;&lt;/asp:TextBox&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;
            &lt;/td&gt;
            &lt;td&gt;
                &lt;asp:RequiredFieldValidator ID="rfvFirstName" runat="server" ControlToValidate="txtFirstName"
                    Display="Dynamic" ErrorMessage="Please enter your first name."&gt;&lt;/asp:RequiredFieldValidator&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td class="lbl"&gt;
                Last Name&lt;/td&gt;
            &lt;td class="field"&gt;
                &lt;asp:TextBox ID="txtLastName" runat="server" CssClass="txt"&gt;&lt;/asp:TextBox&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;
            &lt;/td&gt;
            &lt;td&gt;
                &lt;asp:RequiredFieldValidator ID="rfvLastName" runat="server" ControlToValidate="txtLastName"
                    Display="Dynamic" ErrorMessage="Please enter your last name."&gt;&lt;/asp:RequiredFieldValidator&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td class="lbl"&gt;
                Country&lt;/td&gt;
            &lt;td class="field"&gt;
                &lt;rad:RadComboBox ID="cbxCountry" runat="server" Width="336px" Height="150px" MarkFirstMatch="true" Skin="UltimateBlack" OffsetX="2"&gt;&lt;/rad:RadComboBox&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr style="padding-top: 4px"&gt;
            &lt;td class="lblnotrequired"&gt;
                Company Name&lt;/td&gt;
            &lt;td class="fieldnotrequired"&gt;
                &lt;asp:TextBox ID="txtCompany" runat="server" CssClass="txt"&gt;&lt;/asp:TextBox&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td class="lbl"&gt;
                Time Zone&lt;/td&gt;
            &lt;td class="field"&gt;
                &lt;rad:RadComboBox ID="cbxTimeZone" runat="server" Width="336px" Height="150px" MarkFirstMatch="true" Skin="UltimateBlack" OffsetX="2"&gt;&lt;/rad:RadComboBox&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;
            &lt;/td&gt;
            &lt;td class="formbtn"&gt;
                &lt;asp:Button ID="btnRegister" runat="server" OnClick="btnRegister_Click" CssClass="btn"
                    Text="Register" /&gt;&lt;/td&gt;
        &lt;/tr&gt;
    &lt;/table&gt;
    &lt;/asp:PlaceHolder&gt;
&lt;/div&gt;
&lt;/asp:Content&gt;
</code></pre>
