Hi,
The ASP.NET ajax calendar you refer to is an extender, so in theory you could add it to your textbox at runtime in the code-behind. See the example below:
<body>
<form id="form1" runat="server"><asp:scriptmanager runat="server"></asp:scriptmanager>
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:PlaceHolder ID="Place1" runat="server"></asp:PlaceHolder>
</div>
</form>
</body>
Code Behind:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using AjaxControlToolkit;
namespace WebApplication2
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
CalendarExtender myCalExt = new CalendarExtender();
myCalExt.TargetControlID = "TextBox1";
Place1.Controls.Add(myCalExt);
}
}
}
Rimjhim4, if this helps please login to Mark As Answer. | Alert Moderator