当前位置: 代码迷 >> C# >> C# mvc4 Redirect相关有关问题
  详细解决方案

C# mvc4 Redirect相关有关问题

热度:588   发布时间:2016-04-28 08:34:08.0
C# mvc4 Redirect相关问题
代码:

 [RouteArea("TrafficFines")]
    public class TrafficFinesController : BaseController
    {
.................................



        [GET("PayView/{orderID}/{orderTime}/{totalFee}")]
        public ActionResult PayView(string orderID, string orderTime, decimal totalFee)
        {
            PayInfo pm = new PayInfo
            {
                orderID = Request.get("orderID"),
                orderTime = Convert.ToDateTime(Request.get("orderTime")),
                totalFee = Request.getDecimal("totalFee"),
                openID = base.UUID,
                partnerID = BaseConfig.Instance.API_partnerID(),
                sign = BaseConfig.Instance.API_sign()
            };
            return View(pm);
        }


..........................
 PayInfo pm = new PayInfo
            {
                orderID = fillOrderResponse.Ordersn,
                orderTime = DateTime.Now,
                totalFee = fillOrderResponse.Ordercharge * 10 * 10,
                openID = base.UUID,
                partnerID = BaseConfig.Instance.API_partnerID(),
                sign = BaseConfig.Instance.API_sign()
            };
            return Redirect("/TrafficFines/PayView?orderID=" + fillOrderResponse.Ordersn + "&orderTime=" + DateTime.Now + "&totalFee=" + fillOrderResponse.Ordercharge * 10 * 10);
....


Redirect跳转找不到页面404,
没有分了....
------解决思路----------------------
PayView/{orderID}/{orderTime}/{totalFee} 这个在Url的路径里。

Redirect("/TrafficFines/PayView?orderID=" + ... 这个在Url的Query参数里。
  相关解决方案