KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a project that was previously built by someone else. When I try to add a new control to the page, I can't access it in the code behind. When I try to access it there's an error message that the Control is not defined in the current context. <%@ Page Language="C#" MasterPageFile="~/HRMS.Master" AutoEventWireup="true" CodeBehind="manageEmployee.aspx.cs" Inherits="HRMS.manageEmployee" Title="Untitled Page" %> <%@ Register Assembly="eWorld.UI" Namespace="eWorld.UI" TagPrefix="ew" %> <%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <script type="text/javascript"> document.getElementById("employee").setAttribute("class", "selected"); </script> <!--OPEN CONTENT DIV--> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <!-- Only this area is updated on PostBack --> <div class="manage_employ"> <ul> <li style="margin-top:10px; margin-bottom:15px"><input type="image" src="images/img_manageEmployee01.png"/></li> </ul> <ul> <li>First name</li> <li><asp:TextBox runat="server" class="text_input" id="txtFirstName"/></li> <asp:RequiredFieldValidator ID="validatorFirstName" runat="server" ErrorMessage="*" ControlToValidate="txtFirstName"></asp:RequiredFieldValidator> <li>Last name</li> <li><asp:TextBox runat="server" class="text_input" id="txtLastName"/></li> <asp:RequiredFieldValidator ID="validatorLastname" runat="server" ErrorMessage="*" ControlToValidate="txtLastName"></asp:RequiredFieldValidator> </ul> &l
Tags (comma-separated)
Save Edits
Cancel