学习笔记

// 命名空间
using  System.Text.RegularExpressions;
// 检查客户端浏览器及版本。
         if  ( ! new  Regex( " MSIE [6789] " ).IsMatch(Request.UserAgent.ToUpper()))
        
{
            Response.Redirect(
"../OpenResources/improperBrowser.htm"true);
        }
 
// 设置字体跳转
< a href = " Default.aspx "   class = " text " > Store Main Page </ a >
// 定义连接 传值
< area href = " Category.aspx?category_id=BIRDS "  alt = " Birds "  coords = " 408,133,514,239 "  shape = " RECT " >
// 获取传过来的值 并显示
lblPage.Text  =  Request.QueryString[ " category_id " ];

// 获取一个值指示该页面验证是否成功
if  (Page.IsValid  ==   true )
// 判断ID值是否为--空字符串,此字段为只读字段
if  (customerID  ==   string .Empty)

// md5 密码加密,必须加此命名空间才能引用FormsAuthentication类
using  System.Web.Security;  
PassWord 
=  FormsAuthentication.HashPasswordForStoringInConfigFile(PassWord,  " md5 " ).ToLower().Substring( 8 16 );

// 弹出窗口并关闭
Response.Write( " <script>alert('弹出窗口');history.back();</script> " );
Response.End();

// 转换日期格式   或  {0:D}
Convert.ToDateTime(dr[ " UpDataTime " ]).ToLongDateString()

// 加入收藏
[ < A href = " javascript:window.external.addFavorite('http://www.cfedu.net','赤峰教育网'); " > 加入收藏 </ A > ]

// QQ留言
< A href = " http://wpa.qq.com/msgrd?V=1&amp;Uin=1310800&amp;Site=www.cfedu.net&amp;Menu=yes "
                                target
= " blank " >< IMG alt = " 点击给我QQ留言 "  src = " Images/8_offline.gif "  border = " 0 " ></ A >
// 在一个容器内找到控件,并转换类型
(类名)FindControl( " 要查找的ID " )

// 在Respeater控件 传值 并转换类型
< td >< a href = ' <%# "ShowNew.aspx?FileTitle=" +Server.UrlEncode((string)DataBinder.Eval(Container.DataItem,"FileTitle"))%> ' ><% # DataBinder.Eval(Container.DataItem,  " FileTitle " ) %></ a >

// 鼠标移动显示的背景色
< tr style = " background:#FFFFFF "  onMouseOut = " this.style.backgroundColor='#FFFFFF' "  onMouseOver = " this.style.backgroundColor='#F2F2F2' " >
< td ></ td >
< td ></ td >
< td ></ td >
</ tr >
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值