Calendar srv control : how to select a week automaticaly ?

  • Thread starter Philippe Melisen
  • Start date
P

Philippe Melisen

hi,

i would like to know if it is possible to select a week
(not a day) like when we click on the calendar, when we
display for the first time or when we load the aspx page.
How can i do this automatic selection ?

Any help will be appreciated.
 
Y

Yan-Hong Huang[MSFT]

Hello phillippe,

Please refer to the following codes:

<asp:Calendar id="calendar1" runat="server"
SelectionMode="DayWeekMonth"
SelectMonthText="&lt;*&gt;"
SelectWeekText="-&gt;"/>

<SelectorStyle BackColor="LightGray">
</SelectorStyle>

</asp:Calendar>

The Calendar.SelectionMode Property is what you need. By using it, you
could select a single date, an entire week or even an entire month.

Hope it helps.

Best regards,
yhhuang
VS.NET, Visual C++
Microsoft

This posting is provided "AS IS" with no warranties, and confers no rights.
Got .Net? http://www.gotdotnet.com
--------------------
!Content-Class: urn:content-classes:message
!From: "Philippe Melisen" <[email protected]>
!Sender: "Philippe Melisen" <[email protected]>
!Subject: Calendar srv control : how to select a week automaticaly ?
!Date: Thu, 3 Jul 2003 00:59:29 -0700
!Lines: 8
!Message-ID: <[email protected]>
!MIME-Version: 1.0
!Content-Type: text/plain;
! charset="iso-8859-1"
!Content-Transfer-Encoding: 7bit
!X-Newsreader: Microsoft CDO for Windows 2000
!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!Thread-Index: AcNBOQfXsdruwKUWS2y1RaRW8XQW8A==
!Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
!Path: cpmsftngxa09.phx.gbl
!Xref: cpmsftngxa09.phx.gbl
microsoft.public.dotnet.framework.aspnet.webcontrols:3211
!NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
!
!hi,
!
!i would like to know if it is possible to select a week
!(not a day) like when we click on the calendar, when we
!display for the first time or when we load the aspx page.
!How can i do this automatic selection ?
!
!Any help will be appreciated.
!
 
P

Philippe Mélisen

Thanks for your reply but,
What i'm looking for is to select a week programaticaly
and view the selection the FIRST time that the asp page is
displayed. There is a property SelectedDate, but it is
only to select ONE dy, not a week.

Any idea ?

Thanks
 
Y

Yan-Hong Huang[MSFT]

Hello Phillippe,

Ah, I understand now. We may achieve it by using SelectedDates.Add();

Please refer to this link:
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=1073&lng
WId=10

If you have follow up questions, please post here.

Best regards,
yhhuang
VS.NET, Visual C++
Microsoft

This posting is provided "AS IS" with no warranties, and confers no rights.
Got .Net? http://www.gotdotnet.com
--------------------
!Content-Class: urn:content-classes:message
!From: =?iso-8859-1?Q?Philippe_M=E9lisen?= <[email protected]>
!Sender: =?iso-8859-1?Q?Philippe_M=E9lisen?= <[email protected]>
!References: <[email protected]>
<[email protected]>
!Subject: RE: Calendar srv control : how to select a week automaticaly ?
!Date: Mon, 7 Jul 2003 23:55:10 -0700
!Lines: 76
!Message-ID: <[email protected]>
!MIME-Version: 1.0
!Content-Type: text/plain;
! charset="iso-8859-1"
!Content-Transfer-Encoding: 7bit
!X-Newsreader: Microsoft CDO for Windows 2000
!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!Thread-Index: AcNFHd+SJvYnMNrlRe+7eAlo+gpGQA==
!Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
!Path: cpmsftngxa09.phx.gbl
!Xref: cpmsftngxa09.phx.gbl
microsoft.public.dotnet.framework.aspnet.webcontrols:3319
!NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
!
!Thanks for your reply but,
!What i'm looking for is to select a week programaticaly
!and view the selection the FIRST time that the asp page is
!displayed. There is a property SelectedDate, but it is
!only to select ONE dy, not a week.
!
!Any idea ?
!
!Thanks
!>-----Original Message-----
!>Hello phillippe,
!>
!>Please refer to the following codes:
!>
!> <asp:Calendar id="calendar1" runat="server"
!> SelectionMode="DayWeekMonth"
!> SelectMonthText="<*>"
!> SelectWeekText="->"/>
!>
!> <SelectorStyle BackColor="LightGray">
!> </SelectorStyle>
!>
!> </asp:Calendar>
!>
!>The Calendar.SelectionMode Property is what you need. By
!using it, you
!>could select a single date, an entire week or even an
!entire month.
!>
!>Hope it helps.
!>
!>Best regards,
!>yhhuang
!>VS.NET, Visual C++
!>Microsoft
!>
!>This posting is provided "AS IS" with no warranties, and
!confers no rights.
!>Got .Net? http://www.gotdotnet.com
!>--------------------
!>!Content-Class: urn:content-classes:message
!>!From: "Philippe Melisen" <[email protected]>
!>!Sender: "Philippe Melisen" <[email protected]>
!>!Subject: Calendar srv control : how to select a week
!automaticaly ?
!>!Date: Thu, 3 Jul 2003 00:59:29 -0700
!>!Lines: 8
!>!Message-ID: <[email protected]>
!>!MIME-Version: 1.0
!>!Content-Type: text/plain;
!>! charset="iso-8859-1"
!>!Content-Transfer-Encoding: 7bit
!>!X-Newsreader: Microsoft CDO for Windows 2000
!>!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!>!Thread-Index: AcNBOQfXsdruwKUWS2y1RaRW8XQW8A==
!>!Newsgroups:
!microsoft.public.dotnet.framework.aspnet.webcontrols
!>!Path: cpmsftngxa09.phx.gbl
!>!Xref: cpmsftngxa09.phx.gbl
!>microsoft.public.dotnet.framework.aspnet.webcontrols:3211
!>!NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
!>!X-Tomcat-NG:
!microsoft.public.dotnet.framework.aspnet.webcontrols
!>!
!>!hi,
!>!
!>!i would like to know if it is possible to select a week
!>!(not a day) like when we click on the calendar, when we
!>!display for the first time or when we load the aspx page.
!>!How can i do this automatic selection ?
!>!
!>!Any help will be appreciated.
!>!
!>
!>.
!>
!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top