Re: Setting SelectedDate in <asp:calendar
From: TenDot (TenDot_at_discussions.microsoft.com)
Date: 10/01/04
- Previous message: news.telus.net: "Giving Components Permissions"
- In reply to: Ray Costanzo [MVP]: "Re: Setting SelectedDate in <asp:calendar"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 30 Sep 2004 17:53:03 -0700
Sorry, I'm new here. Thanks I'll repost
"Ray Costanzo [MVP]" wrote:
> 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
>
>
>
- Previous message: news.telus.net: "Giving Components Permissions"
- In reply to: Ray Costanzo [MVP]: "Re: Setting SelectedDate in <asp:calendar"
- Messages sorted by: [ date ] [ thread ]