Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 29th, 2008, 04:11 PM
Registered User
 
Join Date: Feb 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Online Diary Mod Show Entry Title on Calendar

I got the online diary working and wanted to know how to modify the calendar code so that the Entry Titles are displayed on the calendar on the days they are added. For example, if I enter a diary entry on March 29 2008, I would like the calendar to display the title of this entry on March 29 below the date.

I appreciate your assistance.
 
Old March 30th, 2008, 08:51 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

You can handle the DayRender event and then insert a new control (like a Literal) into the Controls collection of the Cell, like this:
Code:
protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)
{
  if (e.Day.IsSelected)
  {
    Literal myLiteral = new Literal();
    myLiteral.Text = "SomeText";
    e.Cell.Controls.AddAt(e.Cell.Controls.Count, myLiteral);
  }
}
Take a look at the following articles for more ideas and explanation:

http://odetocode.com/Articles/223.aspx
http://weblogs.sqlteam.com/jhermiz/a...n-ASP.net.aspx

Did you even resolve your other issues? I posted some pointers / tips but never heard back from you....

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
 
Old March 31st, 2008, 10:59 AM
Registered User
 
Join Date: Feb 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello Imar,

Thanks for your response.

Yes, I was able to resolve the previous issue. I was receiving the error message with the stored procedure because I didn't set-up the SQL DiaryDB database that goes with the calendar program correctly.

After recreating the database and making sure all stored procedures and functions were included, the program worked with a charm.

Thanks again for your response.
 
Old April 1st, 2008, 12:02 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Great; glad you got it all working. Hopefully the Title solution worked as well....

Imar

---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.





Similar Threads
Thread Thread Starter Forum Replies Last Post
OnLine Diary- Mobile Version snbelani BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 3 September 1st, 2008 01:32 AM
OnLine Diary conversion to C# trent BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 7 August 5th, 2008 10:46 AM
Online Diary Problems gsrai31 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 2 April 17th, 2008 09:44 AM
ONline Diary Mod Question Mel64081 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 1 February 8th, 2007 05:18 PM
Online Diary - works! mpremji BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 0 April 19th, 2006 06:13 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.