1

Hy guys, Im trying to firure out the Global.asax file... I was learning how to code Web Apps in Visual studio 2010 and now i have Visual studio 2013. I cant find the global.asax.cs file where I would write application start, session end, session start conde.

I found this solution to the problem but im still getting this error. pls help

'jquery' is not a valid script name. The name must end in '.js'.

<%@ Application Language="C#" %>
<%@ Import Namespace="System.ComponentModel.DataAnnotations" %>
<%@ Import Namespace="System.Web.Routing" %>
<%@ Import Namespace="System.Web.DynamicData" %>
<%@ Import Namespace="System.Web.UI" %>



<script Language="C#" RunAt="server">

    void Application_Start(object sender, EventArgs e) 
    {
        //Create application state variables
        Application["TotalApplications"] = 0;
        Application["TotalUserSessions"] = 0;

        //Increment TotalApplications by 1
        Application["TotalUserSessions"] = (int)Application["TotalUserSessions"] + 1;
    }

    void Session_Start(object sender, EventArgs e)
    { 
        //Increment TotalUserSessions by 1
        Application["TotalUserSessions"] = (int)Application["TotalUserSessions"] + 1;
    }

    void Session_End(object sender, EventArgs e)
    { 
        //Decrement TotalUserSessions by 1
        Application["TotalUserSessions"] = (int)Application["TotalUserSessions"] - 1;
    }

</script>
Tom B.
  • 2,892
  • 3
  • 13
  • 34
Mr.Riply
  • 825
  • 1
  • 12
  • 34
  • 1
    Look here http://stackoverflow.com/questions/9535244/global-asax-cant-find-code-behind-class – David Pine Jan 22 '16 at 12:50
  • 1
    This is a possible duplicatie of http://stackoverflow.com/questions/14974767/jquery-is-not-a-valid-script-name-the-name-must-end-in-js – Tom B. Jan 22 '16 at 13:07

0 Answers0