TimePickerControl

Discussion in 'ASP .Net' started by simon, Dec 15, 2003.

  1. simon

    simon Guest

    I need timePicker control which allows user to pick the time.

    So I use Microsoft Date and Time picker control 6.0 which is shown on page
    as activex:

    <OBJECT id="izberiCas" style="Z-INDEX: 101; LEFT: 64px; WIDTH: 64px;
    POSITION: absolute; TOP: 80px; HEIGHT: 32px"
    classid="clsid:20DD1B9E-87C4-11D1-8BE3-0000F8754DA1" VIEWASTEXT
    runat="server">
    <PARAM NAME="_ExtentX" VALUE="1693">
    <PARAM NAME="_ExtentY" VALUE="847">
    <PARAM NAME="_Version" VALUE="393216">
    <PARAM NAME="MousePointer" VALUE="0">
    <PARAM NAME="Enabled" VALUE="1">
    <PARAM NAME="OLEDropMode" VALUE="0">
    <PARAM NAME="CalendarBackColor" VALUE="-2147483643">
    <PARAM NAME="CalendarForeColor" VALUE="-2147483630">
    <PARAM NAME="CalendarTitleBackColor" VALUE="-2147483633">
    <PARAM NAME="CalendarTitleForeColor" VALUE="-2147483630">
    <PARAM NAME="CalendarTrailingForeColor" VALUE="-2147483631">
    <PARAM NAME="CheckBox" VALUE="0">
    <PARAM NAME="CustomFormat" VALUE="mm:ss">
    <PARAM NAME="DateIsNull" VALUE="0">
    <PARAM NAME="Format" VALUE="662831107">
    <PARAM NAME="UpDown" VALUE="1">
    <PARAM NAME="CurrentDate" VALUE="37970">
    <PARAM NAME="MaxDate" VALUE="2958465">
    <PARAM NAME="MinDate" VALUE="-109205">
    </OBJECT>
    On code behind:

    Protected WithEvents izberiCas As New DateTimePicker
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles MyBase.Load
    izberiCas.CustomFormat = "MMMM dd, yyyy - dddd"
    izberiCas.Format = DateTimePickerFormat.Custom
    End Sub

    If I use runat=server attribute than I get the following error:

    Description: An error occurred during the parsing of a resource required to
    service this request. Please review the following specific parse error
    details and modify your source file appropriately.

    Parser Error Message: Guid should contain 32 digits with 4 dashes
    (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

    So, I guess that you cant use the activeX as runat=server.

    Does anybody else has some other timepicker control which works on code
    behind or tell me what is wrong here?

    Thank you,
    Simon
    simon, Dec 15, 2003
    #1
    1. Advertising

  2. simon

    Joe Gass Guest

    How about using this activex one but fill in the "blanks" with inline
    asp.net script

    e.g.
    <OBJECT id="izberiCas" style="Z-INDEX: 101; LEFT: 64px; WIDTH: 64px;
    POSITION: absolute; TOP: 80px; HEIGHT: 32px"
    classid="clsid:20DD1B9E-87C4-11D1-8BE3-0000F8754DA1" VIEWASTEXT>
    .....
    <PARAM NAME="CustomFormat" VALUE="<% = myCustomFormat %>">
    ..... etc, etc
    </OBJECT>

    Then in your codebehind make a public property called myCustomFormat




    "simon" <> wrote in message
    news:%...
    > I need timePicker control which allows user to pick the time.
    >
    > So I use Microsoft Date and Time picker control 6.0 which is shown on page
    > as activex:
    >
    > <OBJECT id="izberiCas" style="Z-INDEX: 101; LEFT: 64px; WIDTH: 64px;
    > POSITION: absolute; TOP: 80px; HEIGHT: 32px"
    > classid="clsid:20DD1B9E-87C4-11D1-8BE3-0000F8754DA1" VIEWASTEXT
    > runat="server">
    > <PARAM NAME="_ExtentX" VALUE="1693">
    > <PARAM NAME="_ExtentY" VALUE="847">
    > <PARAM NAME="_Version" VALUE="393216">
    > <PARAM NAME="MousePointer" VALUE="0">
    > <PARAM NAME="Enabled" VALUE="1">
    > <PARAM NAME="OLEDropMode" VALUE="0">
    > <PARAM NAME="CalendarBackColor" VALUE="-2147483643">
    > <PARAM NAME="CalendarForeColor" VALUE="-2147483630">
    > <PARAM NAME="CalendarTitleBackColor" VALUE="-2147483633">
    > <PARAM NAME="CalendarTitleForeColor" VALUE="-2147483630">
    > <PARAM NAME="CalendarTrailingForeColor" VALUE="-2147483631">
    > <PARAM NAME="CheckBox" VALUE="0">
    > <PARAM NAME="CustomFormat" VALUE="mm:ss">
    > <PARAM NAME="DateIsNull" VALUE="0">
    > <PARAM NAME="Format" VALUE="662831107">
    > <PARAM NAME="UpDown" VALUE="1">
    > <PARAM NAME="CurrentDate" VALUE="37970">
    > <PARAM NAME="MaxDate" VALUE="2958465">
    > <PARAM NAME="MinDate" VALUE="-109205">
    > </OBJECT>
    > On code behind:
    >
    > Protected WithEvents izberiCas As New DateTimePicker
    > Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    > System.EventArgs) Handles MyBase.Load
    > izberiCas.CustomFormat = "MMMM dd, yyyy - dddd"
    > izberiCas.Format = DateTimePickerFormat.Custom
    > End Sub
    >
    > If I use runat=server attribute than I get the following error:
    >
    > Description: An error occurred during the parsing of a resource required

    to
    > service this request. Please review the following specific parse error
    > details and modify your source file appropriately.
    >
    > Parser Error Message: Guid should contain 32 digits with 4 dashes
    > (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
    >
    > So, I guess that you cant use the activeX as runat=server.
    >
    > Does anybody else has some other timepicker control which works on code
    > behind or tell me what is wrong here?
    >
    > Thank you,
    > Simon
    >
    >
    Joe Gass, Dec 16, 2003
    #2
    1. Advertising

  3. simon

    simon Guest

    ok, what about setting the start time, which value is not readable:

    <PARAM NAME="CurrentDate" VALUE="37970">

    VALUE="37970" means: 15.12.2004 0:00:00

    Do you know for some other timePicker control which is not activeX?

    thank you for your answer
    Simon


    "Joe Gass" <> wrote in message
    news:...
    > How about using this activex one but fill in the "blanks" with inline
    > asp.net script
    >
    > e.g.
    > <OBJECT id="izberiCas" style="Z-INDEX: 101; LEFT: 64px; WIDTH: 64px;
    > POSITION: absolute; TOP: 80px; HEIGHT: 32px"
    > classid="clsid:20DD1B9E-87C4-11D1-8BE3-0000F8754DA1" VIEWASTEXT>
    > ....
    > <PARAM NAME="CustomFormat" VALUE="<% = myCustomFormat %>">
    > .... etc, etc
    > </OBJECT>
    >
    > Then in your codebehind make a public property called myCustomFormat
    >
    >
    >
    >
    > "simon" <> wrote in message
    > news:%...
    > > I need timePicker control which allows user to pick the time.
    > >
    > > So I use Microsoft Date and Time picker control 6.0 which is shown on

    page
    > > as activex:
    > >
    > > <OBJECT id="izberiCas" style="Z-INDEX: 101; LEFT: 64px; WIDTH: 64px;
    > > POSITION: absolute; TOP: 80px; HEIGHT: 32px"
    > > classid="clsid:20DD1B9E-87C4-11D1-8BE3-0000F8754DA1" VIEWASTEXT
    > > runat="server">
    > > <PARAM NAME="_ExtentX" VALUE="1693">
    > > <PARAM NAME="_ExtentY" VALUE="847">
    > > <PARAM NAME="_Version" VALUE="393216">
    > > <PARAM NAME="MousePointer" VALUE="0">
    > > <PARAM NAME="Enabled" VALUE="1">
    > > <PARAM NAME="OLEDropMode" VALUE="0">
    > > <PARAM NAME="CalendarBackColor" VALUE="-2147483643">
    > > <PARAM NAME="CalendarForeColor" VALUE="-2147483630">
    > > <PARAM NAME="CalendarTitleBackColor" VALUE="-2147483633">
    > > <PARAM NAME="CalendarTitleForeColor" VALUE="-2147483630">
    > > <PARAM NAME="CalendarTrailingForeColor" VALUE="-2147483631">
    > > <PARAM NAME="CheckBox" VALUE="0">
    > > <PARAM NAME="CustomFormat" VALUE="mm:ss">
    > > <PARAM NAME="DateIsNull" VALUE="0">
    > > <PARAM NAME="Format" VALUE="662831107">
    > > <PARAM NAME="UpDown" VALUE="1">
    > > <PARAM NAME="CurrentDate" VALUE="37970">
    > > <PARAM NAME="MaxDate" VALUE="2958465">
    > > <PARAM NAME="MinDate" VALUE="-109205">
    > > </OBJECT>
    > > On code behind:
    > >
    > > Protected WithEvents izberiCas As New DateTimePicker
    > > Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    > > System.EventArgs) Handles MyBase.Load
    > > izberiCas.CustomFormat = "MMMM dd, yyyy - dddd"
    > > izberiCas.Format = DateTimePickerFormat.Custom
    > > End Sub
    > >
    > > If I use runat=server attribute than I get the following error:
    > >
    > > Description: An error occurred during the parsing of a resource required

    > to
    > > service this request. Please review the following specific parse error
    > > details and modify your source file appropriately.
    > >
    > > Parser Error Message: Guid should contain 32 digits with 4 dashes
    > > (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
    > >
    > > So, I guess that you cant use the activeX as runat=server.
    > >
    > > Does anybody else has some other timepicker control which works on code
    > > behind or tell me what is wrong here?
    > >
    > > Thank you,
    > > Simon
    > >
    > >

    >
    >
    simon, Dec 16, 2003
    #3
  4. simon

    kulit Guest


    >-----Original Message-----
    >I need timePicker control which allows user to pick the

    time.
    >
    >So I use Microsoft Date and Time picker control 6.0

    which is shown on page
    >as activex:
    >
    ><OBJECT id="izberiCas" style="Z-INDEX: 101; LEFT: 64px;

    WIDTH: 64px;
    >POSITION: absolute; TOP: 80px; HEIGHT: 32px"
    > classid="clsid:20DD1B9E-87C4-11D1-8BE3-0000F8754DA1"

    VIEWASTEXT
    >runat="server">
    > <PARAM NAME="_ExtentX" VALUE="1693">
    > <PARAM NAME="_ExtentY" VALUE="847">
    > <PARAM NAME="_Version" VALUE="393216">
    > <PARAM NAME="MousePointer" VALUE="0">
    > <PARAM NAME="Enabled" VALUE="1">
    > <PARAM NAME="OLEDropMode" VALUE="0">
    > <PARAM NAME="CalendarBackColor" VALUE="-2147483643">
    > <PARAM NAME="CalendarForeColor" VALUE="-2147483630">
    > <PARAM NAME="CalendarTitleBackColor" VALUE="-

    2147483633">
    > <PARAM NAME="CalendarTitleForeColor" VALUE="-

    2147483630">
    > <PARAM NAME="CalendarTrailingForeColor" VALUE="-

    2147483631">
    > <PARAM NAME="CheckBox" VALUE="0">
    > <PARAM NAME="CustomFormat" VALUE="mm:ss">
    > <PARAM NAME="DateIsNull" VALUE="0">
    > <PARAM NAME="Format" VALUE="662831107">
    > <PARAM NAME="UpDown" VALUE="1">
    > <PARAM NAME="CurrentDate" VALUE="37970">
    > <PARAM NAME="MaxDate" VALUE="2958465">
    > <PARAM NAME="MinDate" VALUE="-109205">
    > </OBJECT>
    >On code behind:
    >
    >Protected WithEvents izberiCas As New DateTimePicker
    >Private Sub Page_Load(ByVal sender As System.Object,

    ByVal e As
    >System.EventArgs) Handles MyBase.Load
    > izberiCas.CustomFormat = "MMMM dd, yyyy - dddd"
    > izberiCas.Format = DateTimePickerFormat.Custom
    >End Sub
    >
    >If I use runat=server attribute than I get the following

    error:
    >
    >Description: An error occurred during the parsing of a

    resource required to
    >service this request. Please review the following

    specific parse error
    >details and modify your source file appropriately.
    >
    >Parser Error Message: Guid should contain 32 digits with

    4 dashes
    >(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
    >
    >So, I guess that you cant use the activeX as

    runat=server.
    >
    >Does anybody else has some other timepicker control

    which works on code
    >behind or tell me what is wrong here?
    >
    >Thank you,
    >Simon
    >
    >
    >.

    Excentrics World .NET
    This a compilation of several very useful controls. Time
    picker and datetime picker, collapsable panels, and other
    good stuff. It's a bargin.

    SD
    Information Services, LLC
    kulit, Dec 16, 2003
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page