Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
ASP .Net
ASP .Net Web Controls
Error using Calendar control in a Modal Dialog
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Cathie, post: 4286120"] I am trying to use a calendar control in a modal dialog box but when I set SmartNavigation to true (necessary for the modal dialog to referesh itself when a button is fired) I get the following error: javascript__doPostBack('Calendar1','1287') Object Expected Is there any way to get this to work? Note: I am currently using Framework 1.0 aspx code: <asp:Calendar id="Calendar1" runat="server" Visible="False"></asp:Calendar> (obviously < = < and > = >) aspx.cs code: protected System.Web.UI.WebControls.Calendar Calendar1; protected System.Web.UI.WebControls.TextBox TextBox1; protected System.Web.UI.WebControls.Button Button1; private void Page_Load(object sender, System.EventArgs e) { if (!IsPostBack) { Calendar1.SelectedDate = Calendar1.TodaysDate; } } private void InitializeComponent() { this.Button1.Click += new System.EventHandler(this.Button1_Click); this.Calendar1.SelectionChanged += new System.EventHandler(this.Calendar1_SelectionChanged); this.Load += new System.EventHandler(this.Page_Load); } private void Calendar1_SelectionChanged(object sender, System.EventArgs e) { TextBox1.Text = Calendar1.SelectedDate.ToString("dd/mm/yyyy"); Calendar1.Visible = false; } private void Button1_Click(object sender, System.EventArgs e) { Calendar1.Visible = true; } Cathie [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
ASP .Net
ASP .Net Web Controls
Error using Calendar control in a Modal Dialog
Top