3
Contributors
10
Replies
12
Views
7 Years
Discussion Span
Last Post by crishjeny
0

>take a look at what???

Download .net35 sp1. You know that, for routing, you have to use framework 3.5 or 4.0.

0

>so we cant do routing without sp1..right !!!!!!!!

Right but you can think about url-rewrite (however, url-rewrite and url-routing is not same).

Please mark this thread as solved if you have found an answer to your question and good luck!

0

Hi

I will give you some code. to solve the issue of routing in asp.net.It will help you.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace MvcApplication1
{
    // Note: For instructions on enabling IIS6 or IIS7 classic mode, 
    // visit [url]http://go.microsoft.com/?LinkId=9394801[/url]

    public class MvcApplication : System.Web.HttpApplication
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                "Default",                                              // Route name
                "{controller}/{action}/{id}",                           // URL with parameters
                new { controller = "Home", action = "Index", id = "" }  // Parameter defaults
            );

        }

        protected void Application_Start()
        {
            RegisterRoutes(RouteTable.Routes);
        }
    }

Edited by mike_2000_17: Fixed formatting

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.