I have a page with a number of dynamic controls.
For some of the dynamically created textboxes, I'd like to add calendar control using jQuery (Keith Wood)
Normally, if the textbox controls are not dynamic, I would have the following javascript function to call on the calendar popup for the txtBoxDate textbox:
$(function () {
$('#<%=txtBoxDate.ClientID%>').datepick({ dateFormat: 'dd MM yyyy' });
});
Since I don't now the IDs of my dynamically created textboxes, how do I call on the jQuery calendar function?
Any ideas?
Much appreciated!
EIDT: I create the controls as follows with some loop (to create multiple):
TableRow tr = new TableRow();
TableCell td1 = new TableCell();
TableCell td2 = new TableCell();
TextBox txtValue = new TextBox();
txtValue.Width = 250;
txtValue.ID = "textbox_" + dt.Rows[j][2].ToString();