Ajax FilteredTextBox
效果:字符过虑功能
1. 五个TextBox,五个FilteredTextBox,并且进行绑定
2. 特殊字符,数字,大小写字母,数字字母的设置,特殊字符是在此VaildChars输入一些特殊字符(~!@#$^&*()<>?:"{}|/';/.,)其它都是在FilteredTextBoxExteneder中的FilterType设置为:Numbers,UppercaseLeters,LowercaseLetters,进行设置字母和字母是数字与字母的组合
3. 效果:如果输入的是中文,可以输入进行去但鼠标一离开TextBox就会清空,所以是输不进去的
Ajax控件之HoverMenu
效果:一个弹出示菜单
1. 拖放一个Panel要在它的周转显示一个菜单
2. 添加第二个Panel,放入两个LinkButton,Text属性改为菜单一,菜单二;
3. 添加HoverMenu并与Panel进行绑定
4. 设置Panel的HoverMenuExtender属性的PopuContolID,让它关联到Panel2,让它在Panel中周围进行显示设置PopupPosition:Left
5. 设置响应时间:PopDelay:100,是0.1秒
6. popupMenu,popupHover进行编写,分别加入Pamel2,和Panel1里的HoverCssClass
7. Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Ajax HoverMenu</title>
<style type="text/css">
.popupMenu
{
position:absolute;
visibility:hidden;
background-color:#F5F7F8;
opacity:8;
}
.popupHover
{
background-image:url(images/header.png);
background-repeat;repeat-x;
background-positin:left top;
background-color:#F5F7F8;
}
</style>
</head>
<body style="text-align: center">
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:Panel ID="Panel1" runat="server" Height="14px" Width="88px">
中心地点</asp:Panel>
<asp:Panel ID="Panel2" runat="server" Height="50px" Width="125px" CssClass="popupMenu">
<asp:LinkButton ID="LinkButton1" runat="server">菜单一</asp:LinkButton>
<br />
<asp:LinkButton ID="LinkButton2" runat="server">菜单二</asp:LinkButton></asp:Panel>
<cc1:HoverMenuExtender ID="HoverMenuExtender1" runat="server" PopDelay="100" PopupControlID="Panel2"
PopupPosition="Left" TargetControlID="Panel1" HoverCssClass="popupHover">
</cc1:HoverMenuExtender>
</form>
</body>
</html>
8.