Specified cast is not valid

D

David C

I have added some Calendar Extenders to a FormView for some of the TextBoxes
holding dates. I am getting a runtime error of "Specified cast is not valid
and it is highlighting the CalendarExtender control. Below is the control
and the extender control. I was wondering if this error is due to the fact
that the date column OnHoldDate) I am binding to is Null? If so, what is a
workaround? Thanks.

David

<asp:TextBox ID="txtRaceID" runat="server" Text='<%# Bind("RaceID") %>'
CssClass="Hide"></asp:TextBox>

<cc1:CalendarExtender ID="CalendarExtender3" runat="server"
TargetControlID="txtOnHoldDate"
SelectedDate='<%# Bind("OnHoldDate") %>'>
</cc1:CalendarExtender>
 
G

Guest

I have added some Calendar Extenders to a FormView for some of the TextBoxes
holding dates.  I am getting a runtime error of "Specified cast is not valid
and it is highlighting the CalendarExtender control.  Below is the control
and the extender control.  I was wondering if this error is due to the fact
that the date column OnHoldDate) I am binding to is Null?  If so, what is a
workaround?  Thanks.

David

<asp:TextBox ID="txtRaceID" runat="server" Text='<%# Bind("RaceID") %>'
CssClass="Hide"></asp:TextBox>

<cc1:CalendarExtender ID="CalendarExtender3" runat="server"
TargetControlID="txtOnHoldDate"
              SelectedDate='<%# Bind("OnHoldDate") %>'>
 </cc1:CalendarExtender>

Hi David,

please look at this post
http://forums.asp.net/t/1262133.aspx

Hope this helps
 
D

David C

I have added some Calendar Extenders to a FormView for some of the
TextBoxes
holding dates. I am getting a runtime error of "Specified cast is not
valid
and it is highlighting the CalendarExtender control. Below is the control
and the extender control. I was wondering if this error is due to the fact
that the date column OnHoldDate) I am binding to is Null? If so, what is a
workaround? Thanks.

David

<asp:TextBox ID="txtRaceID" runat="server" Text='<%# Bind("RaceID") %>'
CssClass="Hide"></asp:TextBox>

<cc1:CalendarExtender ID="CalendarExtender3" runat="server"
TargetControlID="txtOnHoldDate"
SelectedDate='<%# Bind("OnHoldDate") %>'>
</cc1:CalendarExtender>

Hi David,

please look at this post
http://forums.asp.net/t/1262133.aspx

Hope this helps

It was perfect! Thank you so much.

David
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top