News:

SQL Table To C# Entity Model ConverterEntity Model (Class Properties) to SQL Table ConverterIf you encounter any trouble visiting our site, please contact us.

Advertisement

Looking for job. Try JobLoader- First ever job search engine in Bangladesh. All open bd jobs now a single mouse click away.

;
01 public static void RegisterRoutes(RouteCollection routes) 
02 {
03 routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
05 routes.MapRoute("Default","{controller}/{action}/{id}",new { controller = "Home", action = "Index", id = "" });
06 }

You implement a controller named HomeController that includes methods with the following signatures.

public ActionResult About()
public ActionResult Index()
public ActionResult Details(int id)

You need to ensure that the About action is invoked when the root URL of the site is accessed. What should you do?

  1. At line 04 in the Global.asax.cs file, add the following line of code.

    routes.MapRoute("Default4Empty", "/", new {controller="Home", action="About"} );
    
  2. At line 04 in the Global.asax.cs file, add the following line of code.

    routes.MapRoute("Default", "", new { controller="Home", action="About"} );
    
  3. Replace line 05 in the Global.asax.cs file with the following line of code.

    routes.MapRoute(v "Default4Empty", "{controller}/{action}/{id}", new {controller="Home",  action="About", id=""} );
    
  4. Replace line 05 in the Global.asax.cs file with the following line of code.

    routes.MapRoute("Default", "{controller}/{action}", new {controller="Home", action ="About"});
    
Answer: Answer is c
comments powered by Disqus
Advertisement

BCS Preparation now even more easy. ReadBD is the place where you can find all kind of resources to be successful in BCS,Bank,Islami Bank exam and interview.

Looking for job. Try JobLoader- First ever job search engine in Bangladesh. All open bd jobs now a single mouse click away.

;