$ sudo /Developer/Library/uninstall-devtools --mode=all
$ sudo /Developer/Library/uninstall-devtools --mode=all
我们知道BoundField.HtmlEncode 属性可以设置一个单元格是否能够htmlencode,我今天碰到的问题是:自动生成列的GridView,表头可能是包含html的比如<font color=red>邮件</font>,默认被htmlencode了,而我不希望这样做,所以有了如下的代码:
我们知道BoundField.HtmlEncode 属性可以设置一个单元格是否能够htmlencode,我今天碰到的问题是:自动生成列的GridView,表头可能是包含html的比如<font color=red>邮件</font>,默认被htmlencode了,而我不希望这样做,所以有了如下的代码:
如何在Console下输入密码,像*unix系统下那样不显示,或者显示星号,如下代码经过测试:
/// <summary>
/// Gets the console secure password.
/// </summary>
/// <returns></returns>
private static SecureString GetConsoleSecurePassword( )
{
SecureString pwd = new SecureString( );
while ( true )
{
ConsoleKeyInfo i = Console.ReadKey( true );
if ( i.Key == ConsoleKey.Enter )
{
break;
}
else if ( i.Key == ConsoleKey.Backspace )
{
pwd.RemoveAt( pwd.Length - 1 );
Console.Write( "\b \b" );
}
else
{
pwd.AppendChar( i.KeyChar );
Console.Write( "*" );
}
}
return pwd;
}
/// <summary>
/// Gets the console password.
/// </summary>
/// <returns></returns>
private static string GetConsolePassword( )
{
StringBuilder sb = new StringBuilder( );
while ( true )
{
ConsoleKeyInfo cki = Console.ReadKey( true );
if ( cki.Key == ConsoleKey.Enter )
{
Console.WriteLine( );
break;
}
if ( cki.Key == ConsoleKey.Backspace )
{
if ( sb.Length > 0 )
{
Console.Write( "\b\0\b" );
sb.Length--;
}
continue;
}
Console.Write( '*' );
sb.Append( cki.KeyChar );
}
return sb.ToString( );
}
使用window.location跳转,在FF中,没问题,下一页面可以取得UrlReffer,但在IE中UrlReffer不被记录
真变态,
让我头痛了半天,弄了个丑陋的办法做了如下实现:
说明:在页面上render一个连接(可以用样式表控制不显示),判断如果是IE浏览器然则调用其click,嘿嘿,就这个。
使用window.location跳转,在FF中,没问题,下一页面可以取得UrlReffer,但在IE中UrlReffer不被记录
真变态,
让我头痛了半天,弄了个丑陋的办法做了如下实现:
说明:在页面上render一个连接(可以用样式表控制不显示),判断如果是IE浏览器然则调用其click,嘿嘿,就这个。
嘿嘿,其实Container有个Parent属性,把它转换为RepeaterItem再取其DataItem
DataBinder.Eval(((System.W