web 2.0

ASP.NET(vb.net) & Substitution - asp:Substitution

ASP.NET(vb.net) & Substitution - asp:Substitution - asp:Substitution : ASP.NET v1.x introduced a powerful feature known as Partial Page Caching. This feature allowed developers to construct ASP.NET pages which were partly dynamic and partly cached. Regions marked as dynamic are executed on each request while areas marked as cached are executed only once and cached until a specific dependency is enforced. The cached regions are separated into user controls with appropriate cache directives, and the dynamic content either remains in the parent Page or is contained in user controls without cache directives.

ShotDev Focus:
- ASP.NET(vb.net) & Substitution - asp:Substitution

ASP.NET(vb.net) & Substitution - asp:Substitution



<%@ Page Language="VB" %>
<%@ OutputCache Duration=60 VaryByParam="None" %>

<script runat="server">
Sub Page_Load()
Label1.Text = DateTime.Now.ToString()
End Sub

Public Shared Function GetTime(ByVal context As HttpContext) _
As String
Return DateTime.Now.ToString()
End Function

<title>ShotDev.Com Tutorial</title>
<form id="form1" runat="server">
<asp:Label runat="server" ID="Label1" />
<asp:Substitution runat="server"
MethodName="GetTime" />
<asp:Button runat="server" ID="Button1" Text="Submit"/>


ASP.NET(vb.net) & Substitution - asp:Substitution
Download this script.

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (No Ratings Yet)
Loading ... Loading ...

Leave a Reply

You must be logged in to post a comment.