Solved

Seleted mode

Posted on 2004-10-14
3
232 Views
Last Modified: 2010-04-15
Hi Experts,

How do I get value of CalendarSelectionMode and recognize which mode was used week, weekday. dayweekmonth ?

Thanks.
0
Comment
Question by:fpoyavo
3 Comments
 
LVL 1

Author Comment

by:fpoyavo
Comment Utility
I HAVE FOUND IT : MyCalendar.SelectedDates

Thanks to all.
0
 
LVL 8

Expert Comment

by:Razzie_
Comment Utility
Glad you found it fpoyavo!

To get your points refunded, please go to the Community Support TA and ask to Close and refund this question and a moderator will close it.

Cheers,

Razzie
0
 
LVL 3

Accepted Solution

by:
aacool earned 250 total points
Comment Utility
The SelectionMode property for a Calendar web control returns a value of the enum System.Web.UI.WebControls.CalendarSelectionMode

This can have the values CalendarSelectionMode.Day,CalendarSelectionMode.Week,CalendarSelectionMode.DayWeekMonth or CalendarSelectionMode.None

To set the value, e.g.
      void Selection_Change(Object sender, EventArgs e)
      {

         // Set the day selection mode.
         Calendar1.SelectionMode =
            (CalendarSelectionMode)ModeList.SelectedIndex;

      }


To get the value in C#
 void Selection_Change(Object sender,EventArgs e)
{
        CalendarSelectionMode selectedMode = Calendar1.SelectionMode;
        switch(selectedMode)
        {
           case CalendarSelectionMode.Day:
                                                               //do day processing
                                                             break;
           case CalendarSelectionMode.Week:
                                                              // do week processing
                                                             break;
           case CalendarSelectionMode.DayWeekMonth:
                                                              // do month processing
                                                              break;
        }
}

Hope this addresses your question.
aacool
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

728 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now