I need help regarding Caching?
I am having a Texbox control, that should be caching.
and another one is label control display the system time.
One control in Caching and another one non caching. How to chcek it is working or not?
I tried below code but that i was not understood..
.aspx Source code
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Cachingimpl.aspx.cs" Inherits="Cachingimpl" %>
<%@ OutputCache Duration="60" VaryByControl="TextBox1" %>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:Label ID="lbl" runat="server" ></asp:Label>
</div>
</form>
</body>
Code Behind
Page Load Evenets
TextBox1.Text = "Naga";
lbl.Text = System.DateTime.Now.ToString();
OUT PUT
--> 1. Text Box data will fetch from the Cache
2.Label time should always change between 60 seconds.
But here Label also going cache without using caching.
Can you please explain me?
Nagaraju