The calendar feature in the Gridview is not functioning properly. I have assigned unique values to both the Gridview textbox and calendar image button. However, the click event of the calendar is not working within the Gridview. The same code works fine when used without the grid.
<asp:TemplateField HeaderText="BirthDate" ItemStyle-Width="15%">
<ItemTemplate>
<asp:TextBox ID="txtBirthDate" Text='<%# Eval("BirthDate", "{0:dd-MMM-yyyy}")%>'
runat="server" Width="80px"></asp:TextBox>
<img id='<%# Eval("EmployeeId") %>' alt="" src="../../_layouts/Images/itevent.png" />
<input type="text" id='<%# Eval("CtrlId") %>' style="display: none" name="txtExpDate"
value="<%# Eval("BirthDate") %>" readonly="readonly">
<script type="text/javascript">
Calendar.setup
({
inputField: '<%# Eval("CtrlId") %>',
ifFormat: '%d-%b-%Y ',
button: '<%# Eval("EmployeeId") %>',
align: 'Br'
});
</script>
</ItemTemplate>
</asp:TemplateField>