关于MVC中的Global.asax文件 [英] About Global.asax File in MVC
本文介绍了关于MVC中的Global.asax文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
关于MVC中的Global.asax文件详细信息
About Global.asax File in MVC in Detail
推荐答案
Global.asax是任何应用程序的核心,因为它包含
Global.asax is the heart of any application as it contains the
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
WebApiConfig.Register(GlobalConfiguration.Configuration);
//it has configuration for Web Api template if you use in MVC4
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
//this you can refer to my first message in my profile about Action Filters and global Filters
RouteConfig.RegisterRoutes(RouteTable.Routes);
//this guides the user with the application i.e. navigation paths.
BundleConfig.RegisterBundles(BundleTable.Bundles);
//this is used for bundling your scripts and styles(css) files so that the page load and its efficiency increases.
}
this is a brief idea about Global.asax accept the solution if you find any help in it.
thank you
Happy Coding
Enjoy SD's
参考以下链接
http://www.asp.net/mvc/tutorials/旧版本/控制器和路由/ asp-net-mvc-routing-overview-cs [ ^ ]
http://stackoverflow.com/questions/16884074/asp -net-mvc-application-error-handler-in-global-asax [ ^ ]
http://www.dzone.com/articles/aspnet-mvc-4-where-have-all [ ^ ]
refer the below link
http://www.asp.net/mvc/tutorials/older-versions/controllers-and-routing/asp-net-mvc-routing-overview-cs[^]
http://stackoverflow.com/questions/16884074/asp-net-mvc-application-error-handler-in-global-asax[^]
http://www.dzone.com/articles/aspnet-mvc-4-where-have-all[^]
这篇关于关于MVC中的Global.asax文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文