A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_URI::$config is deprecated

Filename: core/URI.php

Line Number: 101

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Router::$uri is deprecated

Filename: core/Router.php

Line Number: 127

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Blogs::$benchmark is deprecated

Filename: core/Controller.php

Line Number: 82

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/User.php
Line: 7
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 8
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Blogs::$hooks is deprecated

Filename: core/Controller.php

Line Number: 82

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/User.php
Line: 7
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 8
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Blogs::$config is deprecated

Filename: core/Controller.php

Line Number: 82

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/User.php
Line: 7
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 8
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Blogs::$log is deprecated

Filename: core/Controller.php

Line Number: 82

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/User.php
Line: 7
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 8
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Blogs::$utf8 is deprecated

Filename: core/Controller.php

Line Number: 82

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/User.php
Line: 7
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 8
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Blogs::$uri is deprecated

Filename: core/Controller.php

Line Number: 82

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/User.php
Line: 7
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 8
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Blogs::$exceptions is deprecated

Filename: core/Controller.php

Line Number: 82

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/User.php
Line: 7
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 8
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Blogs::$router is deprecated

Filename: core/Controller.php

Line Number: 82

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/User.php
Line: 7
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 8
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Blogs::$output is deprecated

Filename: core/Controller.php

Line Number: 82

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/User.php
Line: 7
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 8
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Blogs::$security is deprecated

Filename: core/Controller.php

Line Number: 82

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/User.php
Line: 7
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 8
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Blogs::$input is deprecated

Filename: core/Controller.php

Line Number: 82

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/User.php
Line: 7
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 8
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Blogs::$lang is deprecated

Filename: core/Controller.php

Line Number: 82

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/User.php
Line: 7
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 8
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Blogs::$db is deprecated

Filename: core/Loader.php

Line Number: 396

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/User.php
Line: 7
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 8
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_DB_mysqli_driver::$failover is deprecated

Filename: database/DB_driver.php

Line Number: 371

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/User.php
Line: 7
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 8
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Trying to access array offset on true

Filename: libraries/Email.php

Line Number: 978

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/User.php
Line: 7
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 8
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Blogs::$email is deprecated

Filename: core/Loader.php

Line Number: 1283

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/User.php
Line: 7
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 8
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::close() should either be compatible with SessionHandlerInterface::close(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 295

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/User.php
Line: 7
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 8
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::read($session_id) should either be compatible with SessionHandlerInterface::read(string $id): string|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 169

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/User.php
Line: 7
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 8
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::write($session_id, $session_data) should either be compatible with SessionHandlerInterface::write(string $id, string $data): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 238

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/User.php
Line: 7
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 8
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::destroy($session_id) should either be compatible with SessionHandlerInterface::destroy(string $id): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 318

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/User.php
Line: 7
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 8
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::gc($maxlifetime) should either be compatible with SessionHandlerInterface::gc(int $max_lifetime): int|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 359

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/User.php
Line: 7
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 8
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 282

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/User.php
Line: 7
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 8
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_set_cookie_params(): Session cookie parameters cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 289

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/User.php
Line: 7
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 8
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 304

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/User.php
Line: 7
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 8
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 314

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/User.php
Line: 7
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 8
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 315

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/User.php
Line: 7
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 8
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 316

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/User.php
Line: 7
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 8
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 317

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/User.php
Line: 7
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 8
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 375

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/User.php
Line: 7
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 8
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_set_save_handler(): Session save handler cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 110

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/User.php
Line: 7
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 8
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_start(): Session cannot be started after headers have already been sent

Filename: Session/Session.php

Line Number: 143

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/User.php
Line: 7
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 8
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Blogs::$session is deprecated

Filename: core/Loader.php

Line Number: 1283

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/User.php
Line: 7
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 8
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Blogs::$user_model is deprecated

Filename: core/Loader.php

Line Number: 358

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/User.php
Line: 7
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 8
Function: __construct

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$load is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 234
Function: view

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$pgmodule is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 234
Function: view

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$benchmark is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 234
Function: view

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$hooks is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 234
Function: view

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$config is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 234
Function: view

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$log is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 234
Function: view

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$utf8 is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 234
Function: view

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$uri is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 234
Function: view

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$exceptions is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 234
Function: view

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$router is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 234
Function: view

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$output is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 234
Function: view

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$security is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 234
Function: view

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$input is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 234
Function: view

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$lang is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 234
Function: view

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$db is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 234
Function: view

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$email is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 234
Function: view

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$session is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 234
Function: view

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$user_model is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home1/biognosy/skmlhometuitions.in/application/controllers/Blogs.php
Line: 234
Function: view

File: /home1/biognosy/skmlhometuitions.in/index.php
Line: 315
Function: require_once

ASP.NET MVC-ROUTING | Post Details - SKML Home Tuitions
ASP.NET MVC-ROUTING
Sep 15, 2016 07:00 0 Comments DotNet Raj Kumar

Routing is the process of directing an HTTP request to a controller and the functionality of this processing is implemented in System.Web.Routing. This assembly is not part of ASP.NET MVC. It is actually part of the ASP.NET runtime, and it was officially released with the ASP.NET as a .NET 3.5 SP1.

System.Web.Routing is used by the MVC framework, but it's also used by ASP.NET Dynamic Data. The MVC framework leverages routing to direct a request to a controller. The Global.asax file is that part of your application, where you will define the route for your application.

Following is the code from the application start event in Global.asax for an MVC application.

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.Mvc;

using System.Web.Routing;

 

namespace MVCFirstApp {

   public class MvcApplication : System.Web.HttpApplication {

      protected void Application_Start(){

         AreaRegistration.RegisterAllAreas();

         RouteConfig.RegisterRoutes(RouteTable.Routes);

      } }}

 

Following is the implementation of RouteConfig class, which contains one method RegisterRoutes.

using System;
using System.Collections.Generic;
using System.Linq;
 
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
 
namespace MVCFirstApp {
   public class RouteConfig {
      public static void RegisterRoutes(RouteCollection routes){
         routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
         routes.MapRoute(
            name: "Default",
            url: "{controller}/{action}/{id}",
            defaults: new{ controller = "Home", action = "Index", id = UrlParameter.Optional});
      } }}

You will define the routes and those routes will map URLs to a specific controller action. An action is just a method on the controller. It can also pick parameters out of that URL and pass them as parameters into the method.

So, this route that is defined in the application is the default route. As seen in the above code, when you see a URL arrive in the form of (something)/(something)/(something), then the first piece is the controller name, second piece is the action name, and the third piece is an ID parameter.

 

Understanding Routes

MVC applications use the ASP.NET routing system, which decides how URLs map to controllers and actions.

When Visual Studio creates the MVC project, it adds some default routes to get us started. When you run your application, you will see that Visual Studio has directed the browser to port 63664. You will almost certainly see a different port number in the URL that your browser requests because Visual Studio allocates a random port when the project is created.

 

Prev Next
About the Author
Topic Replies (0)
Leave a Reply
Guest User

You might also like

Not sure whare to join tuition right for you?

Choose the right one for you.
Get the help of the experts and find a solution that best suits your needs.


Let`s Connect