Mega Code Archive

 
Categories / ASP.Net Tutorial / Development
 

OutputCache Duration=30 VaryByParam=true (C#)

<%@ Page Language="C#" %> <%@ OutputCache Duration="30" VaryByParam="true"%> <script runat="server">    void Page_Load(Object Sender, EventArgs e) {       lblMessage.Text = "Welcome " + Request.Params["id"] + "! The time is now " + DateTime.Now.ToString("T");    } </script> <html><body>    <asp:Label id="lblMessage" runat="server"/> </body></html>