I am trying to use a calendar control to populate a text box in a gridview cell in edit mode.
Error with this line.
<a href="javascript:OpenPopupPage('Calendar.aspx','<%= txtGvEditTeDate.ClientID %>','<%= Page.IsPostBack %>');">
It does not recognize the text field.
Compilation error
Compiler Error Message: CS0103: The name 'txtGvEditTeDate' does not exist in the current context
Source Error:
<EditItemTemplate>
<asp:TextBox ID="txtGvEditTeDate" runat="server" onfocus="blur();"
Text='<%# Bind("TimeEntryDate", "{0:d}") %>'>
</asp:TextBox>
<a href="javascript:OpenPopupPage('Calendar.aspx','<%= txtGvEditTeDate.ClientID %>','<%= Page.IsPostBack %>');">
<img src="images/icon-calendar.gif" border="0" align="middle" ></a>
</EditItemTemplate>
Edit
I added runat = "server" in <a>, and now I do not receive an error message, but when a date is selected in the calendar control, it will not be inserted into the txtGvEditTeDate text box.
source
share