Friday, 29 October 2010

Ajax AlwaysVisibleControlExtender - How to set change UseAnimation programmatically in AlwaysVisibleControlExtender





Ajax AlwaysVisibleControlExtender - How to set change UseAnimation programmatically in AlwaysVisibleControlExtender







AlwaysVisibleControlExtenderUseAnimation.aspx





<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Import Namespace="System.Drawing" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
Label2.Text = DateTime.Now.ToLongTimeString();
AlwaysVisibleControlExtender1.UseAnimation = true;

if (!Page.IsPostBack)
{
string[] colorList = Enum.GetNames(typeof(KnownColor));
int serial = 0;
foreach (string color in colorList)
{
serial += 1;
Label1.Text += serial + "| " + color + "<br />";
}
}
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Ajax AlwaysVisibleControlExtender - How to set change UseAnimation programmatically in AlwaysVisibleControlExtender</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h2 style="color:CadetBlue; font-style:italic;">
ASP.NET Ajax AlwaysVisibleControlExtender - How to set change
<br /> UseAnimation programmatically in AlwaysVisibleControlExtender
</h2>
<hr width="645" align="left" color="SkyBlue" />
<asp:Label
ID="Label1"
runat="server"
ForeColor="MediumOrchid"
Font-Italic="false"
Font-Names="Comic Sans MS"
Font-Size="Medium"
Font-Underline="true"
>
</asp:Label>
<asp:ScriptManager
ID="ScriptManager1"
runat="server"
>
</asp:ScriptManager>
<cc1:AlwaysVisibleControlExtender
ID="AlwaysVisibleControlExtender1"
runat="server"
TargetControlID="Panel1"
VerticalSide="Top"
HorizontalSide="Right"
HorizontalOffset="10"
ScrollEffectDuration="2"
>
</cc1:AlwaysVisibleControlExtender>
<asp:Panel
ID="Panel1"
runat="server"
Width="250"
Height="75"
BorderWidth="2"
BorderStyle="Ridge"
BorderColor="MediumPurple"
BackColor="Purple"
HorizontalAlign="Center"
>
<br />
<asp:Label
ID="Label2"
runat="server"
ForeColor="Snow"
Font-Size="X-Large"
>
</asp:Label>
</asp:Panel>
</div>
</form>
</body>
</html>
















No comments:

Post a Comment