Solved

Calendar Control: How to disable hyperlink for a date and how to remove dates from other months

Posted on 2004-04-22
3
799 Views
Last Modified: 2008-02-26
I have a calendar control in which I want to disable hyperlink on few dates based on some values and also I dont want the dates from other months to be displayed.

Can someone help me with this??

Thanks
Jack
0
Comment
Question by:jackrock79
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 28

Accepted Solution

by:
mmarinov earned 250 total points
ID: 10893396
you can use this
private void Calendar1_DayRender(object sender, System.Web.UI.WebControls.DayRenderEventArgs e)
{
      if ( e.Day.Date.Month != DateTime.Now.Month )
      {
          e.Cell.Text = ""; //clears the cell's
      }
      if ( e.Day.Date.Day == 5 )
          e.Day.IsSelectable = false;
}

B..M
0
 
LVL 2

Author Comment

by:jackrock79
ID: 10893763
Thanks for the code
0
 
LVL 28

Expert Comment

by:mmarinov
ID: 10894057
Hi jackrock79, why Grade B - isn't this code what you are looking for ?

B..M
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question