【发布时间】:2011-10-05 09:37:41
【问题描述】:
这个问题涉及到两个 aspx 页面。在一种形式中,我正在收集实体并将其绑定到会话变量中,然后单击按钮,我试图使用 response.redirect("") 方法进入另一个 aspx 页面。但是,问题是它给了我一个带有奇怪 URl 的错误消息。
让我给你看我写的代码
formSaleMoneyReceiptEntity = ViewFormSaleMoneyReceipt_DAO.GetMoneyReceiptByFormSL(formSl);
Session["MoneyReceipt"] = formSaleMoneyReceiptEntity;
Response.Redirect("~/Reports/MoneyRepeiptFormReport.aspx",false);
我正在使用本地主机,而我得到的 URl 是
http://www.google-feed.net/results.php?q=localhost5808 StudentManagement FormSaleMoneyReceipt aspx &cx=002904446094441487865%3Ate-nlsbrcdy&cof=FORID%3A10&ie=UTF-8&said=&do=search&empty=0&from=2&CID=1
为什么会这样?我没有任何想法。请帮帮我。
【问题讨论】:
-
试试
~/MoneyRepeiptFormReport.aspx -
会不会是因为您在 MoneyRepeiptFormReport 中拼错了 Receipt?
-
我读了大约 20 次试图找出错误,但每次都错过了拼写错误。哦!
-
Thnx,为了您的快速响应,这是我的代码中的拼写错误,现在它在更正输入的错误后可以正常工作。
标签: c# asp.net response.redirect