以下のように、Web ユーザー コントロールの特定のページ要素の値を使用して文字列を作成します。
string bookingdate = ddlDate.SelectedItem.Text
+ "/" + ddlMonth.SelectedValue + "/"
+ ddlMonth.SelectedItem.Text.Substring(4, 2);
「文字列は有効な DateTime として認識されませんでした」を取得します。次の行のエラー
cmd.Parameters.Add(new SqlParameter("@ArrivalDate", SqlDbType.DateTime)).Value =
DateTime.ParseExact(bookingdate, "dd/MM/yyyy", CultureInfo.InvariantCulture);
この文字列 "bookingdate" の値を変更して問題をトラブルシューティングするにはどうすればよいですか。