title: Is it possible to add routes other that Application_start Event in asp.net web forms
body: <p>I have dynamic menus which are created by my clients. I have registered my routes at <code>Application_Start</code> event in <code>global.asax</code>. Now i want to register routes when my clients add new menus. How can i achieve this?</p>
  
  <p>Currently I have registered all old routes at Application_Start event in global.asax.</p>
  
  <pre><code>void Application_Start(object sender, EventArgs e)
  {
      RegisterRoutes(RouteTable.Routes);
  }
  
  void RegisterRoutes(RouteCollection routes)
  {
  
      string connectionstring = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ConnectionString;
      SqlConnection sqlCon = new SqlConnection(connectionstring);
      SqlCommand sqlCmd = new SqlCommand("Sch_Sp_GetRegisterRoutes", sqlCon);
      sqlCmd.CommandType = CommandType.StoredProcedure;
  
      SqlDataAdapter sda = new SqlDataAdapter(sqlCmd);
      DataTable dt = new DataTable();
  
      try
      {
          sda.Fill(dt);
      }
      catch (Exception ex)
      {
      }
      finally
      {
          sqlCon.Close();
  
      }
      if (dt != null &amp;&amp; dt.Rows.Count &gt; 0)
      {
          foreach (DataRow dr in dt.Rows)
          {
              try
              {
                  routes.MapPageRoute(dr["Menuname"].ToString().Replace(" ",string.Empty),
                dr["URL"].ToString(),
                 "~/" + dr["Pagename"].ToString());
              }
              catch (Exception exx)
              {
  
              }
  
          }
      }
  
  
  }
  </code></pre>
  
  <p>In admin login i provide a cms like feature to my clients so they can create new pages. Now my question is, <strong>how can i register these new page routes in routes?</strong>. I do not want to restart my application every time clients add new pages. I just want that when clients add new pages I call a method to register these pages in my routes. How can i achieve this?</p>
  
  <p>Finally I have got a way to fix it.
  I have Call following method to restart my application..</p>
  
  <pre><code> System.Web.HttpRuntime.UnloadAppDomain();
  </code></pre>