3e78a7d6418620e2869c2f631bca89487e9b2165
Guides/MVC-Integration.md
| ... | ... | @@ -55,22 +55,23 @@ Add the Reporting folder in mvc5r3\Views to the project's Views |
| 55 | 55 | |
| 56 | 56 |  |
| 57 | 57 | |
| 58 | -###Step 7. Add _sitelayout (mvc5r3\Views\Shared) to the project’s Shared under Views |
|
| 58 | +###Step 7. Add _sitelayout to project’s Views\Shared |
|
| 59 | 59 | |
| 60 | -Add _sitelayout (mvc5r3\Views\Shared) to the project’s Shared under Views |
|
| 60 | +Drag _sitelayout from mvc5r3\Views\Shared and drop it at project’s Views\Shared |
|
| 61 | 61 | |
| 62 | 62 |  |
| 63 | 63 | |
| 64 | -###Step 8. Copy code from Global.asax except the first line and paste in project’s Global.asax |
|
| 64 | +###Step 8. Copy code from Global.asax except the first line |
|
| 65 | 65 | |
| 66 | -Copy code from Global.asax except the first line and paste in project’s Global.asax |
|
| 66 | +Copy code from Global.asax except the first line and paste it in project’s Global.asax |
|
| 67 | 67 | |
| 68 | 68 | |
| 69 | -##Global.asax from mvc5r3(C♯) |
|
| 69 | +###Global.asax from mvc5r3(C♯) |
|
| 70 | 70 | |
| 71 | 71 | ```csharp |
| 72 | 72 | |
| 73 | 73 | <%@ Application Codebehind="Global.asax.cs" Inherits="MVC4Razor2.MvcApplication" Language="C#" %> //Copy except this line |
| 74 | + |
|
| 74 | 75 | <%@ Import Namespace="Izenda.AdHoc"%> |
| 75 | 76 | <%@ Import Namespace="System.IO"%> |
| 76 | 77 | |
| ... | ... | @@ -112,9 +113,9 @@ Copy code from Global.asax except the first line and paste in project’s Global |
| 112 | 113 | |
| 113 | 114 | ``` |
| 114 | 115 | |
| 116 | +Below is how project's Global.asax should look like. |
|
| 115 | 117 | |
| 116 | -The below is how the project's Global.asax should look like. |
|
| 117 | -##Global.asax from Sample_MVCApp(C♯) |
|
| 118 | +###Global.asax from Sample_MVCApp(C♯) |
|
| 118 | 119 | ```csharp |
| 119 | 120 | <%@ Application Codebehind="Global.asax.cs" Inherits="Sample_MVCApp.MvcApplication" Language="C#" %> |
| 120 | 121 | |
| ... | ... | @@ -160,12 +161,10 @@ The below is how the project's Global.asax should look like. |
| 160 | 161 | ``` |
| 161 | 162 | |
| 162 | 163 | |
| 163 | -###Step 9. Copy specificFilerouter and IzendaResource constraint classes from Globa.asax.cs and paste them above MVCapplication class in Global.asax.cs of the project |
|
| 164 | - |
|
| 165 | -Copy specificFilerouter and IzendaResource constraint classes from Globa.asax.cs and paste them above MVCapplication class in Global.asax.cs of project |
|
| 164 | +###Step 9. Copy constraints classes from Globa.asax.cs |
|
| 166 | 165 | |
| 167 | 166 | |
| 168 | -Copy below two constraints from Globa.asax.cs of mvc5r3 |
|
| 167 | +**a.** Copy below two constraints from Globa.asax.cs of mvc5r3 |
|
| 169 | 168 | ```csharp |
| 170 | 169 | |
| 171 | 170 | //IRouteConstraint |
| ... | ... | @@ -242,12 +241,10 @@ public class IzendaResourceConstraint : IRouteConstraint { |
| 242 | 241 | } |
| 243 | 242 | } |
| 244 | 243 | |
| 245 | - |
|
| 246 | - |
|
| 247 | 244 | ``` |
| 248 | 245 | |
| 246 | +**b.** Paste it above MVCapplication class in Global.asax.cs of project |
|
| 249 | 247 | |
| 250 | -Below is the how the Global.asax.cs should look like |
|
| 251 | 248 | ```csharp |
| 252 | 249 | |
| 253 | 250 | namespace Sample_MVCApp |
| ... | ... | @@ -356,9 +353,10 @@ namespace Sample_MVCApp |
| 356 | 353 | ``` |
| 357 | 354 | |
| 358 | 355 | |
| 359 | -###Step 10. Copy RegisterRoutes in MvcApplication class from Global.asax.cs of mvc5r3 and put it in MvcApplication class of the project’s Global.asax.cs |
|
| 356 | +###Step 10. Copy over RegisterRoutes in MvcApplication |
|
| 357 | + |
|
| 358 | +**a.** Copy the below class from Global.asax.cs of mvc5r3 |
|
| 360 | 359 | |
| 361 | -Copy the below class from Global.asax.cs of mvc5r3 |
|
| 362 | 360 | ```csharp |
| 363 | 361 | public static void RegisterRoutes(RouteCollection routes) { |
| 364 | 362 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); |
| ... | ... | @@ -373,7 +371,7 @@ public static void RegisterRoutes(RouteCollection routes) { |
| 373 | 371 | } |
| 374 | 372 | ``` |
| 375 | 373 | |
| 376 | -Copy RegisterRoutes in MvcApplication class from Global.asax.cs and put it in MvcApplication class of the project’s Global.asax.cs |
|
| 374 | +**b.** Paste it inside MvcApplication class of tproject’s Global.asax.cs |
|
| 377 | 375 | |
| 378 | 376 | ```csharp |
| 379 | 377 | public class MvcApplication : System.Web.HttpApplication |