开发者

working with an .aspx page with in asp.net mvc 2

I'm new to asp.net mvc.

I just created the default asp.net mvc project in VS and I can see that when I make a call to a controller's action like this: "http://localhost:2528/Home/About" my Home controller has an action method "About" that is returning the开发者_StackOverflow社区 about.aspx view. however I am seeing not seeing the .aspx extension in the browser's url. And when I try to browse to "http://localhost:2528/Home/About.aspx" i get a 404 error.

I have a requirement where I need to create a .aspx page that is passed an arguement via the url like this: "http://... /myAspxPageHere.aspx?argName=myArg"

I'm not sure how to do this with asp.net MVC. Any help and/or code examples would be greatly appreciated.

Thanks


ASP.Net MVC does not use the .aspx extension in client-facing URLs.

If you want to accept arguments from the querystring, you should add parameters to your action methods.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜