Microsoft KB Archive/291200

= HOW TO: Set the Default Date for the Calendar Control by Using ASP with FrontPage 2002 =

Article ID: 291200

Article Last Modified on 6/18/2005

-

APPLIES TO


 * Microsoft FrontPage 2002 Standard Edition

-



This article was previously published under Q291200



For a Microsoft FrontPage 2000 version of this article, see 289579.

IN THIS TASK
SUMMARY
 * Set the Default Date for the Calendar Control by Using ASP



SUMMARY
When you insert the ActiveX Calendar Control, the default date is set to the date when the page was created. This article describes how to programmatically set the default date value for the ActiveX Calendar Control by using Microsoft Active Server Pages (ASP).

back to the top

Set the Default Date for the Calendar Control by Using ASP
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. NOTE: You may receive an error message if you copy the examples directly from this article and paste them into FrontPage. The angle brackets may appear as escaped HTML code. To work around this behavior, paste the script into a blank Notepad document, and then copy it from Notepad before you paste it into FrontPage.  Open a web in FrontPage on a Microsoft Internet Information Services (IIS) Web server. Open a new blank page. Insert the Calendar Control. To do this, follow these steps:  On the Insert menu, click Web Component. Under Component type, click Advanced Controls. Under Choose a control, click ActiveX Control. Click Next.</li> Select Calendar Control 10.0.</li> Click Finish.</li></ol> </li> Switch to HTML view.</li>  Find the section of code that looks like this: <param name=&quot;Year&quot; value=&quot;2000&quot;> <param name=&quot;Month&quot; value=&quot;1&quot;> <param name=&quot;Day&quot; value=&quot;1&quot;> Change the code to look like this: <param name=&quot;Year&quot; value=&quot;<%=Year(Date)%>&quot;> <param name=&quot;Month&quot; value=&quot;<%=Month(Date)%>&quot;> <param name=&quot;Day&quot; value=&quot;<%=Day(Date)%>&quot;> </li> Switch to Normal view.</li> Save the page with an ASP extension.</li></ol>

When you browse the page by using HTTP, the ASP code automatically creates the default date based on the current date.

back to the top

Additional query words: OfficeKBHowTo front page inf

Keywords: kbhowto kbhowtomaster KB291200

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.