Re: Setting SelectedDate in <asp:calendar
From: Ray Costanzo [MVP] (my)
Date: 09/30/04
- Next message: news.telus.net: "Giving Components Permissions"
- Previous message: TenDot: "Setting SelectedDate in <asp:calendar"
- In reply to: TenDot: "Setting SelectedDate in <asp:calendar"
- Next in thread: TenDot: "Re: Setting SelectedDate in <asp:calendar"
- Reply: TenDot: "Re: Setting SelectedDate in <asp:calendar"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 30 Sep 2004 14:46:52 -0400
This group, as well as the .general and .db groups are "classic" ASP Groups.
The ASP.NET groups have "aspnet" in their names, i.e.
microsoft.public.dotnet.framework.aspnet.
Ray at work
"TenDot" <TenDot@discussions.microsoft.com> wrote in message
news:5C45E4B7-27DE-42CB-B592-F86955D6EDD6@microsoft.com...
> I'm trying to set the SelectedDate on an <asp:calendar tag to show the
> existing value of a date in a field retrieved from a database and put into
> edit mode in a datagrid.
>
> I've already got a TextBox tag in this datagrid cell that gets assigned
> (and
> works fine):
> <asp:TextBox id=INJECTIONDATE runat="server" Width="94px" Text='<%#
> DataBinder.Eval(Container, "DataItem.INJECTIONDATE") %>'/>
>
>
> It would seem like a no-brainer to do the following in the calendar tag
> that
> wants to show the date preselected in the calendar component:
>
> <asp:Calendar id="calINJECTIONDATE" runat="server" SelectedDate='<%#
> DataBinder.Eval(Container, "DataItem.INJECTIONDATE" ) %>'>
>
> But, as always seems the case with no-brainer solutions in .asp (sorry),
> no
> dice.
>
> I've done some other hoop jumping like calling a function to cast the
> result
> as a DateTime:
> GetDateValue(DataBinder.Eval(Container, "DataItem.INJECTIONDATE" ))
>
> etc. etc.
>
> I've done the usual searching through the literature which all assumes
> that
> you want today's date pre-selected.
>
> I'd be greatful for any adivce that would allow me to set the value to the
> current data in the cell.
>
> Thanks
> --
> TenDot
- Next message: news.telus.net: "Giving Components Permissions"
- Previous message: TenDot: "Setting SelectedDate in <asp:calendar"
- In reply to: TenDot: "Setting SelectedDate in <asp:calendar"
- Next in thread: TenDot: "Re: Setting SelectedDate in <asp:calendar"
- Reply: TenDot: "Re: Setting SelectedDate in <asp:calendar"
- Messages sorted by: [ date ] [ thread ]