I am trying to add a WebDateChooser to my .aspx page from code behind. When the page is run the control renders but when you click on the drop down image to view the calender nothing happens. What an i doing wrong?
Here is my code.
using System;using System.Collections.Generic;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;namespace WebApplication2{ public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { Infragistics.WebUI.WebSchedule.WebDateChooser wdc = new Infragistics.WebUI.WebSchedule.WebDateChooser(); wdc.ID = "tempID"; wdc.Width = Unit.Pixel(75); Page.Controls.Add(wdc); } }}
and the markup
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication2._Default" %><%@ Register assembly="Infragistics2.WebUI.WebDateChooser.v7.3, Version=7.3.20073.38, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" namespace="Infragistics.WebUI.WebSchedule" tagprefix="igsch" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title></head><body> <form id="form1" runat="server"> <div> </div> </form></body></html>
Any help is much appreciated.
Thanks
Hi mhussain,
It has been a while since your post, however in case you still need assistance I will be happy to help.
You should add the WebDateChooser to a form, for instance:
form1.Controls.Add(wdc);
Please let me know if you have any questions.
Best Regards,
Petar IvanovDeveloper Support EngineerInfragistics, Inc.http://es.infragistics.com/support