0

我想在表格中插入数据

flight_reservation(reserve_id, customer_id, tariff_id, total_price, date)

其中reserve_id 是一个auto_id。此外,关税_id 来自表 fare_tariff,而 customer_id 来自表客户。我在reservation.aspx 页面中从数据库中检索了关税ID、total_price 和从日历选择中的日期值,然后将其传递给confirm.aspx 页面。我想在registration.aspx 页面的末尾执行我的查询。所以我想在registration.aspx页面中传递这三个值。现在我的问题是,我可以成功地将关税 ID 和总价格传递给 confirm.aspx 页面。但我无法以同样的方式传递日期值。在预订页面中,我使用了:

Response.Ridirect("confirm.aspx? &tariff_id= " + tariff_id + " &total_price= " + total_price+ " &date= " +date);

我可以在 confirm.aspx 页面中检索关税 ID 和总价格,但无法检索日期值,这里的日期是一个变量,它保持从日历控件中选择的字符串值。谁能帮我检索日期值?

4

1 回答 1

1

对我来说真正突出的一件事是 url 中的空格。当目标页面尝试解析传递给它的日期时,这可能会导致问题。我不认为这是你想要做的。

试试这个:

Response.Ridirect("confirm.aspx?tariff_id=" + tariff_id + "&total_price=" + total_price+ "&date=" +date);
于 2013-04-26T04:33:12.737 回答