0

I am sure this question comes up a lot, but I didn't find an answer in your archives. Here is my ASP code:

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RCC_ChangePassword.ascx.cs" Inherits="Regal.Web._Tester.RCC.RCC_ChangePassword" %>
    <div id="modal-password-change">
        <div class="modal-contents">

            <h1>Change Password</h1>
            <div class="intro">Use the form below to change the password for your RCC account. Use the new password next time you log in.</div>

            <asp:Label ID="CurPass" Text="Current Password" runat="server"></asp:Label>
            <asp:Textbox  id="CurrentPass" runat="server" CssClass="required"></asp:Textbox>

            <asp:Label ID="NwPass" Text="New Password*" runat="server"></asp:Label>
            <asp:Textbox  id="NewPass" runat="server" CssClass="required"></asp:Textbox>

            <asp:Label ID="CnfPass" Text="Confirm Password" runat="server"></asp:Label>
            <asp:Textbox  id="ConfirmPass" runat="server" CssClass="required"></asp:Textbox>

            <h4>Your password must include ALL of the following</h4>
            <ul class="notes">
                <li>At least 8 characters (not more than 16 characters)</li>
                <li>At least one number</li>
            </ul>

            <asp:Button ID="submit" Cssclass="btn blue wide" runat="server" Text="Save Changes" OnClick="btnSubmit_click"></asp:Button>

        </div>

    </div><!-- #modal-password-change .modal -->

And here is the line that I am getting the error on:

 // Change actual password for the new password    
                        String testPass1 = NewPass.Text;    
                        if (regalMemberRepo.ChangePassword(oUser.Email, oUser.Password, testPass1))

can you see anything odd about my code? Thank you in advance.

4

1 回答 1

3

This happens to me often with VS. Take a look in the designer file and see if VS created an entry in there for the text box? Make sure you don't have another file somewhere with a similar declaration.

Many times, best way to fix this is to delete, re-create and re-name the form. We're not supposed to edit the designer file ourselves.

于 2013-11-02T19:08:16.863 回答