473,320 Members | 1,746 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Popup from Calendar control

Does anyone have an example of how you would do a popup window when a user clicks on a day number link in the ASP.NET Web Calendar control?

I am trying to create an event calendar similar to how Outlook works. When user clicks on the day number in the calendar control I want to display a popup window and let user add data and click on the Save button. The code under the save button will save the data to the database and close the popup window.
Thanks
Peter
Nov 19 '05 #1
3 2745
Look at http://www.codeproject.com/aspnet/MellDataCalendar.asp

"Peter" wrote:
Does anyone have an example of how you would do a popup window when a user clicks on a day number link in the ASP.NET Web Calendar control?

I am trying to create an event calendar similar to how Outlook works. When user clicks on the day number in the calendar control I want to display a popup window and let user add data and click on the Save button. The code under the save button will save the data to the database and close the popup window.
Thanks
Peter

Nov 19 '05 #2
Thanks for your help!

Unfortunatly the example does not have any popup windows and that's my main
problem.

How do I display a modal popup window when I user clicks on the day number
link?
"Jouni Karppinen" <Jo************@discussions.microsoft.com> wrote in
message news:3D**********************************@microsof t.com...
Look at http://www.codeproject.com/aspnet/MellDataCalendar.asp

"Peter" wrote:
Does anyone have an example of how you would do a popup window when a
user clicks on a day number link in the ASP.NET Web Calendar control?

I am trying to create an event calendar similar to how Outlook works.
When user clicks on the day number in the calendar control I want to
display a popup window and let user add data and click on the Save
button. The code under the save button will save the data to the
database and close the popup window.
Thanks
Peter

Nov 19 '05 #3
On example OnDayRender-method is overridden. In my event calendar day number
isn't clickable at all, instead all event names are shown as hyperlinks for
each day.

Here few ideas:

protected override void OnDayRender(TableCell cell, CalendarDay day)
{
//Alternative 1:
cell.Text = "<a href=\"#\" onclick=\"javascript:alert('foo')\">Click me</a>";

//or alternative 2 - not tested:
HyperLink newLnk = new HyperLink();
newLnk.NavigateUrl = "#";
newLnk.Attributes.Add("onclick", "javascript:alert('foo')");
newLnk.Text = "Click me";
cell.Controls.Add(newLnk);

base.OnDayRender (cell, day);
}

I haven't tested alternative no. 2, I don't know if you can set hyperlink
only to fire javascript-event without setting NavigateUrl property.

Hope this helps.

"Peter" wrote:
Thanks for your help!

Unfortunatly the example does not have any popup windows and that's my main
problem.

How do I display a modal popup window when I user clicks on the day number
link?
"Jouni Karppinen" <Jo************@discussions.microsoft.com> wrote in
message news:3D**********************************@microsof t.com...
Look at http://www.codeproject.com/aspnet/MellDataCalendar.asp

"Peter" wrote:
Does anyone have an example of how you would do a popup window when a
user clicks on a day number link in the ASP.NET Web Calendar control?

I am trying to create an event calendar similar to how Outlook works.
When user clicks on the day number in the calendar control I want to
display a popup window and let user add data and click on the Save
button. The code under the save button will save the data to the
database and close the popup window.
Thanks
Peter


Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: mkobus | last post by:
Im relatively new, so please be patient with me... I need to update a parent .aspx screen from a popup and close the popup. Normally I would use...
5
by: Merex | last post by:
Hello all, I want to use the Calendar control as a popup window. I would like each day's link to execute some javascript which would set the value of a textbox on the window which opened the...
1
by: DotNetJunkies User | last post by:
I successfully implemented this poup calendar control in C#. But the problem I am having is that the button click is posting back and the validator is getting fired which is asking all the required...
2
by: Avanti | last post by:
Hi, I am using the popup window to show the microsoft calendar control. but I want to hide the titlebar for the popup window. Is they a way around or a different approach I can do this. I am...
4
by: Ali | last post by:
i am using visual studio 2005 and I am trying to create a popup calender so when a user click on a image on the main form, a calender will then popup, the user will select a date and the date will...
5
by: rockdale | last post by:
Hi, I tried to search web for an non-popup calendar control, (like javascript calendar) but could not find a good solution. Most solutions are popup another window and show the calendar, then...
4
by: ShyGuy | last post by:
A while back I had found a link to a popup calendar that had a small button that was placed to the right of any text box. By clicking on the icon and selecting a date the text box was updated with...
2
by: Keith | last post by:
I am looking to use the Calendar control in a standard way, with a couple small(hopefully) differences. I have a textbox with a date, and a calendar button next to it, and when you click the...
3
by: mikaint | last post by:
I'm really confused here...i'll need some help with the following... i have a sceipt that will open a popup win which is actually a calendar and i'm trying to apply a style on the popup... Here's...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.