Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Seleted mode

Posted on 2004-10-14
3
Medium Priority
?
239 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
[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
3 Comments
 
LVL 1

Author Comment

by:fpoyavo
ID: 12310543
I HAVE FOUND IT : MyCalendar.SelectedDates

Thanks to all.
0
 
LVL 8

Expert Comment

by:Razzie_
ID: 12310666
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 1000 total points
ID: 12310694
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

598 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