Hi guys,
I'm trying to get a Application_BeginRequest in Global.asax to execute but it wont.
My Global.asax looks something like this:
<%@ Application Language="C#" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="System.Globalization" %>
<%@ Import Namespace="System.Xml" %>
<%@ Import Namespace="System.Reflection" %>
<%@ Import Namespace="System.Threading" %>
<%@ Import Namespace="System.Web" %>
<script runat="server">
protected void Application_BeginRequest(object sender, EventArgs e)
{
HttpCookie cookie = Request.Cookies["vizor"];
if (cookie != null)
{
String culture = cookie.Values["culture"].ToString();
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(culture);
Thread.CurrentThread.CurrentUICulture = new CultureInfo(culture);
}
}
// Other methods go here
</script>
Does anyone have any suggestions as to why it wont execute? I dont have any event handlers set up, and dont know if / where i have to.
Please advise!!!
David