I'm trying to use a calendar control to populate a textbox in a gridview cell in edit mode.
The error is with this line
<a href="javascript:OpenPopupPage('Calendar.aspx','<%= txtGvEditTeDate.ClientID %>','<%= Page.IsPostBack %>');">
It doesn't recognize the textbox.
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" to the <a>
and now I am not getting an error, but when a date is selected in the calendar control is it not being inserted int the txtGvEditTeDate textbox.