I have an ASP TextBox control with ID="txtDate" that captures a date from a CalendarExtender control. When I try to access the value in codebehind of the txtFecha.Text object, the compiler shows me the message: The name 'txtFecha' does not exist in the current context.
<asp:TextBox ID="txtFecha" runat="server" maxlength="10" ReadOnly = "false"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvFecha" runat="server" ErrorMessage="Campo requerido" Text="*" ControlToValidate = "txtFecha"></asp:RequiredFieldValidator>
<asp:RangeValidator runat="server" ID="rvFecha" Type="Date" ControlToValidate="txtFecha" MaximumValue='01/01/2100' MinimumValue="01/01/1900"
ErrorMessage="Fecha no valida" Display="Dynamic" />
<cc1:CalendarExtender ID = "Calender1" runat = "server" TargetControlID = "txtFecha"></cc1:CalendarExtender>
In codebehind
Session["Fecha"] = txtFecha.Text