By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,426 Members | 1,729 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,426 IT Pros & Developers. It's quick & easy.

2.0: implementing popup calendar

P: n/a
I need to implement popup calendar in ASP.NET application. I created a
button opening popup calendar on 'master' page:

<asp:Button ID="Calendar" runat="server"
Text=Calendar" OnClientClick=
"'Calendar.aspx', 'Calendar',
'menubar=no, location=no, personalbar=no, status=no, resizable=no,
scrollbars=no, width=200, height=200');" />

Here is Calendar.aspx:

<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="Calendar.aspx.cs" Inherits="CalendarPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="" lang="pl">
<head runat="server">
<link rel="Stylesheet" type="text/css" href="Styles.css" />
<body class="WithBackground">
<form id="Demo" runat="server">
<asp:Calendar ID="Calendar" runat="server"
OnSelectionChanged="Calendar_SelectionChanged" />

And here is Calendar.aspx.cs:

public partial class CalendarPage : System.Web.UI.Page
protected void Page_Load(object sender, EventArgs e)
if (!IsPostBack)
Calendar.Attributes.Add("ondblclick", "window.close();");
// NOTE 1: this way I wanted to achieve auto closing of
// calendar window on double click of date; it doesn't work
protected void Calendar_SelectionChanged(object sender,
EventArgs e)
Cache["DataUrodzenia"] =
Calendar.SelectedDate.ToString().Substring(0, 10);
// NOTE 2: how to transfer this value to 'master' page
// (to be visible WITHOUT refresh)?

Could you suggest me a solution to the problems described in NOTE 1
and NOTE 2?
Thank you vey much!
May 30 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.