1
Answer

System.Web.HttpException: <<

Ask a question
Anil Kumar

Anil Kumar

13y
3.1k
1
HI i am creating a new form in my project.

when i am going to run project this error occurd..what i have to do

Unable to find control with id 'Address' that is associated with the Label 'Label2'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Unable to find control with id 'Address' that is associated with the Label 'Label2'.


this is code:-

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Remarks.aspx.cs" Inherits="Techisupport.Remarks" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title> Welcome To Remarks Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table>
            <tr>
                <td>
                    <asp:Label ID="Label" runat="server" AssociatedControlID="Project">Project:</asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="Project" runat="server" CssClass="textEntry"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label2" runat="server" AssociatedControlID="Address">Address:</asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="TxtAddress" runat="server" CssClass="textEntry"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label3" runat="server" AssociatedControlID="Email">Email:</asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="TextEmail" runat="server" CssClass="textEntry"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label4" runat="server" AssociatedControlID="Mobile">Mobile:</asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="TextMobile" runat="server" CssClass="textEntry"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    <asp:Label ID="Label5" runat="server" AssociatedControlID="Remarks">Remarks:</asp:Label>
                </td>
                <td class="style1">
                    <asp:TextBox ID="TextRemarks" runat="server" CssClass="textEntry"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    <asp:Label ID="Label6" runat="server" AssociatedControlID="UserName">Username:</asp:Label>
                </td>
                <td class="style1">
                    <asp:TextBox ID="UserName" runat="server" CssClass="textEntry"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="PasswordLabe7" runat="server" AssociatedControlID="Password">Password:</asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="Password" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
                </td>
            </tr>
        </table>
        <p>
            <asp:Button ID="LoginButton" runat="server" CommandName="Create" Text="Create" ValidationGroup="LoginUserValidationGroup" />
        </p>
        </table>
    </div>
    </form>
</body>
</html>


Answers (1)