In this article we will see how we can use always visible control and what are its uses.
Introduction
Many times we need to display a content that is always visible on page whether you scroll down or up.This can be achieved by using always visible control.
Objective
- Understanding the Always Visible control and its properties.
Using the code
// HMTL Mark up
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AlwaysVisibleControl.aspx.cs"
Inherits="AlwaysVisibleControl" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.style1
{
font-size: xx-large;
}
</style>
</head>
<body style="font-size: small">
<form id="form1" runat="server">
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
<div class="style1" style="text-align: center; font-family: 'Angsana New'">
Always Visible Control of AJAX<br />
<br />
<br />
<div>
ASP.NET AJAX is a free framework for building a new generation of richer,
<br />
more interactive, highly personalized cross-browser web applications. This new web
<br />
development technology from Microsoft integrates cross-browser client script libraries
<br />
with the ASP.NET 2.0 server-based development framework. In addition, ASP.NET AJAX
<br />
offers you the same type of development platform for client-based web pages that ASP.NET
<br />
offers for server-based pages. And because ASP.NET AJAX is an extension of ASP.NET,
<br />
it is fully integrated with server-based services. ASP.NET AJAX makes it possible to easily
<br />
take advantage of AJAX techniques on the web and enables you to create ASP.NET pages
<br />
with a rich, responsive UI and server communication. However, AJAX isn't just for
<br />
ASP.NET. You can take advantage of the rich client framework to easily
<br />
build client-centric web applications that integrate with any backend data provider a<br />
nd run on most modern browsers.
ASP.NET AJAX is a free framework for building a
<br />
new generation of richer, more interactive, highly personalized cross-browser w<br />
eb applications. This new web development technology from Microsoft integrates
<br />
cross-browser client script libraries with the ASP.NET 2.0 server-based development<br />
framework. In addition, ASP.NET AJAX offers you the same type of development
<br />
platform for client-based web pages that ASP.NET offers for server-based pages.
<br />
And because ASP.NET AJAX is an extension of ASP.NET,<br />
it is fully integrated
<br />
with server-based services. ASP.NET AJAX makes it possible to easily take
<br />
advantage of AJAX techniques on the web and enables you to create A<br />
SP.NET pages with a rich, responsive UI and server communication. However, A<br />
JAX isn't just for ASP.NET. You can take advantage of the rich client framework to easily build client-centric web applications that integrate with any backend data provider and run on most modern browsers.
ASP.NET AJAX is a free framework for building a new generation of richer, more interactive, highly personalized cross-browser web applications. This new web development technology from Microsoft integrates cross-browser
<br />
client script libraries with the ASP.NET 2.0 server-based development framework.
<br />
In addition, ASP.NET AJAX offers you the same type of development platform for client-based web pages that ASP.NET offers for server-based pages. And because ASP.NET AJAX is an extension of ASP.NET, it is fully integrated with server-based services. ASP.NET AJAX makes it possible to easily take advantage of AJAX techniques on the web and
<br />
enables you to create ASP.NET pages with a rich, responsive UI and server communication. However, AJAX isn't just for ASP.NET. You can take advantage of the rich client framework to easily build client-centric web applications that integrate with any backend data provider and run on most modern browsers.
ASP.NET AJAX is a free framework for building a new generation of richer, more interactive, highly personalized cross-browser web applications. This new web development technology from Microsoft integrates cross-browser client script libraries with the ASP.NET 2.0 server-based development framework. In addition, ASP.NET AJAX offers you the same type of development platform for client-based web pages that ASP.NET offers for server-based pages. And because ASP.NET AJAX is an extension of ASP.NET, it is fully integrated with server-based services. ASP.NET AJAX makes it possible to easily take advantage of AJAX techniques on the web and enables you to create ASP.NET pages with a rich, responsive UI and server communication. However, AJAX isn't just for ASP.NET. You can take advantage of the rich client framework to easily build client-centric web applications that integrate with any backend data provider and run on most modern browsers.
ASP.NET AJAX is a free framework for building a new generation of richer, more interactive, highly personalized cross-browser web applications. This new web development technology from Microsoft integrates cross-browser client script libraries with the ASP.NET 2.0 server-based development framework. In addition, ASP.NET AJAX offers you the same type of development platform for client-based web pages that ASP.NET offers for server-based pages. And because ASP.NET AJAX is an extension of ASP.NET, it is fully integrated with server-based services. ASP.NET AJAX makes it possible to easily take advantage of AJAX techniques on the web and enables you to create ASP.NET pages with a rich, responsive UI and server communication. However, AJAX isn't just for ASP.NET. You can take advantage of the rich client framework to easily build client-centric web applications that integrate with any backend data provider and run on most modern browsers.
ASP.NET AJAX is a free framework for building a new generation of richer, more interactive, highly personalized cross-browser web applications. This new web development technology from Microsoft integrates cross-browser client script libraries with the ASP.NET 2.0 server-based development framework. In addition, ASP.NET AJAX offers you the same type of development platform for client-based web pages that ASP.NET offers for server-based pages. And because ASP.NET AJAX is an extension of ASP.NET, it is fully integrated with server-based services. ASP.NET AJAX makes it possible to easily take advantage of AJAX techniques on the web and enables you to create ASP.NET pages with a rich, responsive UI and server communication. However, AJAX isn't just for ASP.NET. You can take advantage of the rich client framework to easily build client-centric web applications that integrate with any backend data provider and run on most modern browsers.
ASP.NET AJAX is a free framework for building a new generation of richer, more interactive, highly personalized cross-browser web applications. This new web development technology from Microsoft integrates cross-browser client script libraries with the ASP.NET 2.0 server-based development framework. In addition, ASP.NET AJAX offers you the same type of development platform for client-based web pages that ASP.NET offers for server-based pages. And because ASP.NET AJAX is an extension of ASP.NET, it is fully integrated with server-based services. ASP.NET AJAX makes it possible to easily take advantage of AJAX techniques on the web and enables you to create ASP.NET pages with a rich, responsive UI and server communication. However, AJAX isn't just for ASP.NET. You can take advantage of the rich client framework to easily build client-centric web applications that integrate with any backend data provider and run on most modern browsers.
ASP.NET AJAX is a free framework for building a new generation of richer, more interactive, highly personalized cross-browser web applications. This new web development technology from Microsoft integrates cross-browser client script libraries with the ASP.NET 2.0 server-based development framework. In addition, ASP.NET AJAX offers you the same type of development platform for client-based web pages that ASP.NET offers for server-based pages. And because ASP.NET AJAX is an extension of ASP.NET, it is fully integrated with server-based services. ASP.NET AJAX makes it possible to easily take advantage of AJAX techniques on the web and enables you to create ASP.NET pages with a rich, responsive UI and server communication. However, AJAX isn't just for ASP.NET. You can take advantage of the rich client framework to easily build client-centric web applications that integrate with any backend data provider and run on most modern browsers.
</div>
<span class="style1">
<asp:Label ID="lblTime" runat="server" Text="Label"></asp:Label>
<br />
<br />
</span>
<asp:AlwaysVisibleControlExtender ID="ajaxave" TargetControlID="lblTime" VerticalSide="Top"
VerticalOffset="10" HorizontalSide="Right" HorizontalOffset="10" ScrollEffectDuration=".1"
runat="server">
</asp:AlwaysVisibleControlExtender>
</div>
</form>
</body>
</html>
Now let us understand important properties
- TargetControlID :- This is the id of the control that we want to make it visible.In this case it is our label showing current time.
- HorizontalOffset :- This is distance of the control from the edge of the browser horizontally.Default value is 0 pixel
- HorizontalSide :- This allows to set the horizontal position of the control (left,right,center).
- VerticalOffset :- This is distance of the control from the edge of the browser vertically.Default value is 0 pixel
- ScrollEffectDuration :- It specifies the length of scrolling effect in seconds.Default Value is .1
- UseAnimation :- It sets whether the animation has to be made to the control,by default = false.
Output:-