Lock Application : Application « Development « ASP.Net






Lock Application


<%@ Page %>
<script language="C#" runat="server">
  private void Page_Load(object sender, System.EventArgs e)
  {
    Application.Lock();
    Application["ServerName"]="WebFarm1";
    Application.UnLock();
    MyLabel.Text=Application["ServerName"].ToString();
  }
</script>

<html>
  <body>
    <form id="form1" method="post" runat="server">
    <asp:Label ID="MyLabel" Runat="server"></asp:Label>
     </form>
  </body>
</html>

 








Related examples in the same category

1.Fill and access Application-level data
2.Asp.net development template