Advertisement
Guest User

Chache Example Global.asax

a guest
Sep 2nd, 2014
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.21 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.Security;
  6. using System.Web.SessionState;
  7.  
  8. namespace WebApplication2
  9. {
  10.     public class Global : System.Web.HttpApplication
  11.     {
  12.         public int CatIDToSelect = 2;
  13.         protected void Application_Start(object sender, EventArgs e)
  14.         {
  15.  
  16.         }
  17.  
  18.         protected void Session_Start(object sender, EventArgs e)
  19.         {
  20.  
  21.         }
  22.  
  23.         protected void Application_BeginRequest(object sender, EventArgs e)
  24.         {
  25.  
  26.         }
  27.  
  28.         protected void Application_AuthenticateRequest(object sender, EventArgs e)
  29.         {
  30.  
  31.         }
  32.  
  33.         protected void Application_Error(object sender, EventArgs e)
  34.         {
  35.  
  36.         }
  37.  
  38.         protected void Session_End(object sender, EventArgs e)
  39.         {
  40.  
  41.         }
  42.  
  43.         protected void Application_End(object sender, EventArgs e)
  44.         {
  45.  
  46.         }
  47.         public override string GetVaryByCustomString(HttpContext context, string custom)
  48.         {
  49.             if (custom == "SelectedCatID")
  50.             {
  51.                 return CatIDToSelect.ToString();
  52.             }
  53.             return String.Empty;
  54.         }
  55.     }
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement