viet vo quoc

viet vo quoc

  • NA
  • 115
  • 105.5k

Hide code of Global.asax ??

Oct 13 2011 10:43 AM
Hello!
My problem is i want to hide my code in "global.asax" file.
when i create a .asax file .It look like:
<%@ Application Language="C#" %>

<script runat="server">

    void Application_Start(object sender, EventArgs e)
    {
        // Code that runs on application startup

    }
   
    void Application_End(object sender, EventArgs e)
    {
        //  Code that runs on application shutdown

    }
       
    void Application_Error(object sender, EventArgs e)
    {
        // Code that runs when an unhandled error occurs

    }

    void Session_Start(object sender, EventArgs e)
    {
        // Code that runs when a new session is started

    }

    void Session_End(object sender, EventArgs e)
    {
        // Code that runs when a session ends.
        // Note: The Session_End event is raised only when the sessionstate mode
        // is set to InProc in the Web.config file. If session mode is set to StateServer
        // or SQLServer, the event is not raised.

    }
      
</script>

And i don't want appear the code like that.Maybe i have the library to store it??
I want my code in .asax file like this:
<%@ Application Codebehind="Global.asax.cs" Inherits="library.Global" Language="C#" %>
Give me some advice!!Thanks

Answers (2)