objRA_Campaigns.StartDate = DateTime.ParseExact(tbAgentsAgentComparisonByQuestionaireFrom.Text, "yyyy/MM/dd HH:mm:ss", CultureInfo.InvariantCulture, DateTimeStyles.None);
asp.net日曆擴展字符串不被識別爲日期時間格式asp.net?
<td style="padding-top: 5px; *padding-top: 3px; padding-left: 2px;" valign="middle">
<asp:TextBox ID="tbAgentsAgentComparisonByQuestionaireFrom" runat="server" CssClass="textBoxStyle"
meta:resourcekey="tbAgentsAgentComparisonByQuestionaireFromResource1"
Width="282px"></asp:TextBox>
<asp:ImageButton ID="imgDateCampaignStart" runat="server" CssClass="imgbutton" ImageUrl="~/Images/Calendar.png"
meta:resourcekey="imgDateCampaignStartResource1" />
<cc1:CalendarExtender ID="calAgentsAgentComparisonByQuestionaireFrom" runat="server"
Format="dd-MM-yyyy" PopupButtonID="imgDateCampaignStart" TargetControlID="tbAgentsAgentComparisonByQuestionaireFrom"
Enabled="True">
</cc1:CalendarExtender>
</td>
例外是字符串不是日期時間格式。
你的'tbAgentsAgentComparisonByQuestionaireFrom.Text'確切的值是什麼? –
@SonerGönül例如23-03-2014 –