title: How to use Page_Init in asp.net
body: <p>I wrote this code below to set theme to selected value from list, it works for this page:</p>
  
  <pre><code>  protected void Page_Init(object sender, EventArgs e)
      {
          HttpCookie c = Request.Cookies["theme"];
          Page.Theme = c == null ? "Aqua" : c.Value;
  
      }
      protected void Page_Load(object sender, EventArgs e)
      {
          HttpCookie c = Request.Cookies["theme"];
          if (!IsPostBack &amp;&amp; (c != null))
              rbList.Value = c.Value;
      }
  </code></pre>
  
  <p><strong>Problem:</strong> I want to apply same theme to all other pages for which i wrote <code>Page_Init</code> function in the pages where i want to apply theme, but this <code>Page_Init</code> doesn't work in second page.  am i missing any thing??</p>
  
  <p>Here is the code i am writing in second page:</p>
  
  <pre><code> protected void Page_Init(object sender, EventArgs e)
          {
              HttpCookie c = Request.Cookies["theme"];
              Page.Theme = c == null ? "Aqua" : c.Value;
  
          }
  </code></pre>