Strongly typed urls in asp.net mvc?

If you are using System.Web. Routing for your MVC setup, you can implement an IRouteHandler ( example ) which will return a new instance of your custom IHttpHandler class. Since the logic for instantiating the HttpHandler goes inside the GetHttpHandler method of the IRouteHandler, and the IRouteHandler has access to the route request context data you can pass that in to your HttpHandler's constructor and use it appropriately.

If you are using System.Web. Routing for your MVC setup, you can implement an IRouteHandler (example) which will return a new instance of your custom IHttpHandler class. Since the logic for instantiating the HttpHandler goes inside the GetHttpHandler method of the IRouteHandler, and the IRouteHandler has access to the route request context data, you can pass that in to your HttpHandler's constructor and use it appropriately.

Perhaps I'm missing something, but I don't see how this helps when trying to create a URL with LinkBuilder in say an HttpModule or even a traditional code behind. – bingle Mar 26 '09 at 3:18 @Nick the LinkBuilder uses the RequestContext from System.Web.Routing. You must be using routing to get that RequestContext.

I explained how to create an HttpHandler that can be used in a routing context. – Rex M Mar 26 '09 at 14:50.

As a strongly typed model object. I’ve written a simple MVC 3 Top Blog application to compare and contrast dynamic and strongly typed views. Right click in the IndexNotStonglyTyped() method and add a Razor view.

Make sure the Create a strongly-typed view box is not checked. Because we’re using a dynamic and not a strongly typed view, intellisense doesn’t help us. Now we’ll add a strongly typed view.

Notice it’s exactly the same return View(topBlogs); call as the non-strongly typed view. Right click inside of StonglyTypedIndex() and select Add View. This time select the Blog Model class and select List as the Scaffold template.

Inside the new view template we get intellisense support.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions