global.asax Application_AcquireRequestState与Application_BeginRequest [英] global.asax Application_AcquireRequestState vs. Application_BeginRequest
问题描述
有什么区别? 我想在我的应用程序中实现语言下拉菜单选择.因此,当选择了选择的语言,一个主题文化将被设置和页面重新加载.
what is the difference? I would like to implement Language dropdown selection in my app. So when a selected language is selected, a Thread culture would be set and page reloaded.
像这样:
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-US");
应在何处处理上述设置?是Application_AcquireRequestState还是Application_BeginRequest?
where should settings like above be processed? Application_AcquireRequestState or Application_BeginRequest?
谢谢
推荐答案
Application_BeginRequest发生在生命周期中的较早时间,并且是这种情况下的正常"位置.
Application_BeginRequest occurs earlier in the lifecycle and is the 'usual' place this goes.
http://msdn.microsoft. com/en-us/library/ms178473%28v = VS.100%29.aspx
这篇关于global.asax Application_AcquireRequestState与Application_BeginRequest的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!