Microsoft KB Archive/825492

= How to set the default date for the Calendar control in FrontPage 2003 =

Article ID: 825492

Article Last Modified on 1/6/2006

-

APPLIES TO


 * Microsoft Office FrontPage 2003

-





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



For a Microsoft FrontPage 2002 version of this article, see 291200.

IN THIS TASK

 * SUMMARY
 * Set the Default Date for the Calendar Control with the ActiveX Control Properties
 * Set the Default Date for the Calendar Control by Using ASP



SUMMARY
When you insert the ActiveX Calendar Control in Microsoft Office FrontPage 2003, the default date is set to the date when the page was created. This article describes two methods to set the default date value for the ActiveX Calendar Control.

back to the top

Set the Default Date for the Calendar Control with the ActiveX Control Properties
 Open a Web in FrontPage 2003 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, and then click Next.</li> Click Calendar Control 11.0, and then click Finish.</li></ol> </li> Right-click the Calendar Control, and then click ActiveX Control Properties.</li> On the General tab, change the Value box to the date that you want as the default date, and then click OK.

Note The ActiveX Control Properties dialog box contains many other options and parameters that you can change to customize the Calendar Control.</li></ol>

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 2003. 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 2003. <ol> Open a Web in FrontPage 2003 on an Internet Information Services (IIS) Web server.</li> Open a new blank page.</li> Insert the Calendar Control. To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> On the Insert menu, click Web Component.</li> Under Component type, click Advanced Controls.</li> Under Choose a control, click ActiveX Control, and then click Next.</li> Click Calendar Control 11.0, and then click Finish.</li></ol> </li> Click Code (Show Code View) to view the HTML code for your Web page.</li>  Find the section of code that is similar to this: <param name=&quot;Year&quot; value=&quot;2003&quot;> <param name=&quot;Month&quot; value=&quot;10&quot;> <param name=&quot;Day&quot; value=&quot;5&quot;> Change the code to look similar to 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> Click Design (Show Design View).</li> On the File menu, click Save As and save your page with the ASP extension.</li></ol>

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

back to the top

Keywords: kbhowtomaster kbasp kbcalendar KB825492

-

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

© Microsoft Corporation. All rights reserved.