开发者

MVC Routing removing query string.

开发者 https://www.devze.com 2023-03-24 00:28 出处:网络
/Routeurl?value=1 Gets 开发者_运维知识库redirected to... /Routeurl/ Where as... /RouteUrl/?value=1

/Routeurl?value=1

Gets 开发者_运维知识库redirected to...

/Routeurl/

Where as...

/RouteUrl/?value=1

stays as...

/RouteUrl/?value1

I need the query string parameters in there. How do I get routing to ignore them!

EDIT

This only happens on IIS.


Routing should ignore them inherently if the Routes are not defined in the Global.asax file.

routes.MapRoute(
    "Default",
    "{controller}/{action}/{id}",
    new { controller = "Home", action = "Index", id = "" }
);
0

精彩评论

暂无评论...
验证码 换一张
取 消