唐朝国际歌

张楚蚂蚁

黑豹别伤我的心

周华健一起吃苦的幸福

超载每次都想拥抱你

窦唯噢,乖

 

posted @ 2008-12-29 11:23 真见 阅读(127) | 评论 (4)编辑
posted @ 2008-12-24 12:44 真见 阅读(811) | 评论 (5)编辑

Scott Hanselman's  Visual Studio Programmer Themes Gallery

不难看出,经常见到Scott Guthrie所用的的Visual Studio主题就是Scott Hanselman's推荐的Oren Ellenbogen's Dark Scheme主题。

Oren Ellenbogen's Dark Scheme

A lot of the darker schemes like Oren's don't use a True Black, but an "off  black." His theme is very low contrast and uses muted, relaxing colors.

ide_colors_regular


Mike "Blowmage" Moore's Ruby Blue

This is a low-contrast calm schema, but operators and numbers have a little "pop" to them.

image


Vibrant Borland by Mawi

This one bring backs good memories of writing Borland C++ with OWL and Turbovision, with a little Norton Commander thrown in for fun.

image


CodingHorror

One of the few light-colored themes, Jeff's also uses a custom font to make 0 and O stand out. Note that the white background is more of a paper-colored off-white.

image


Dave Reed's Jedi Scheme

Dave's schema uses a complete black, and a neon blue. A little intense, but much higher contrast.

image


Damien Guard's Humane

This earthy theme includes little details like smart fonts and italics.

image


Tomas Restrepo's Themes

Tomas has done a huge amount of work in this space. You can get seven of his themes here. He's even got a tool to port color schemes from Visual Studio to SQL Management Studio.

Desert Nights

This theme uses the greatest range of colors outside of the Vibrant Ink them, and approaches, but doesn't reach, a number of primary colors.

image

Garden of Eden

Green, Kermit-green, sea-green, they are all here in this blue-green theme.

image

Ragnarok

Initially similar to many dark themes, this one uses complementary colors to provide contrast between identifiers and keywords, string literals and comments.

image

Nightingale

A more cheerful dark theme that includes italics for string literals and brighter neons for keywords.

image

Moria Alternate

This uses Deja Vu Sans Mono as it's font and uses a lot more neutrals and grays outside of the keyword space.

image


Brad Wilson Dark Visual Studio

A muted, low-contrast theme with blues and purples. Even the yellow is relaxed.

image


Martin Plante (slimCODE)

Martin likes small text, no ClearType to take advantage of crisp LCD screens. Rather than committing to blue or black he goes for a navy-gray-blue background.

image


John Lam's Vibrant Ink Port

John's trying for a straight port of Textmate's famous Vibrant Ink. This is a sharp, bright, neo-classic theme. Note his use of Monaco.

image


Rob Conery - Textmate

This is Rob's take on Vibrant Ink, added Consolas as the font, some bolding, and lowers the contrast a smidge.

image

posted @ 2008-12-16 11:40 真见 阅读(951) | 评论 (15)编辑

 Scott Hanselman's Ultimate Developer and Power Users Tool List 2007年开发工具清单。

  Vista>个人认为系统跟WEB(Silverlight)一样,也革命了,必须用上Vista及其以上版本(win2008)。
  NOD32>杀毒软件ESET扫描超速,超轻巧,另一个不错的选择是kaspersky。
  Internet Explorer 8 Beta 2>浏览器功能大战中的主浏览器。
  FireFox>基于接口,扩展,标准型的浏览器。
  Visual Studio 2008>毫无疑问你会用Visual Studio 2005就一定会用Visual Studio 2008。
  Sql Server 2008>我只会用,也只用过微软的数据库。你会用Sql Server 2005应该也会用Sql Server 2008。
  EmEditor>是程序员最好的免费的文本编辑器。
  Reflector>.Net经典插件。
  Launchy>Windows “运行”的 Dock 式替代工具。
  Windows Live Writer>博客工具,比如博客园的MetaWeblog API's,推荐插件:BlogJet
  Volumemouse>小工具,可以通过鼠标中键与鼠标滑轮控制音量大小。
  WiX>Windows Installer XML, 提供一个描述Windows Installer database (MSI or MSM)的模式, 以及将XML描述文档转化成生成Windows Installer安装包的一套工具包。
  Power Toys for Visual Studio>用于帮助开发人员克服难点或协助其诊断与开发相关的问题。
  DAEMON Tools>虚拟光驱工具。
  FlashFXP>FTP工具。
  TestDriven.NET>.NET的单元测试工具,当时其过程中的运行和调试是很痛苦的。
  Windows Clippings>窗口截图工具,在Vista窗口捕捉周围的阴影,官网
  Paint.NET>由微软公司提供项目指导的C#开发出来的平面工具。
  AxCrypt>加密器 它可以对任何文件加密,也有一个自解压的功能,开源和使用了最新的AES公司标准的加密技术。
  CCleaner>特别优秀的系统垃圾清理工具。
  JkDefrag>磁盘整理和优化工具。
  Foxit Reader>与Adobe Reader一样,阅读PDF文件,但要快,要轻,而且系统不会慢。
  HashTab>小工具,属性对话框计算哈希与其他10个不同的算法( MD5编码, SH1 ,等等) 。
  Jing Project>屏幕捕获工具并且保存为视频文件。
  WinMerge>文件比较工具,如果你是编程人员,你就会了解,当你在改版时,在新的代码文件与旧的代码文件之间到底有哪些不同之处,这时候就可以用上。
  DPack>Visual Studio多功能插件。
  Evernote>著名笔记软件。
  Autoruns>在系统启动运行时显示所有程序。
  Sharpkeys>重新分配并控制按键。
  Code Project Add-in>从Visual Stuido内部加载浏览CodeProjects
  Consolas Font Pack>一个非常好的Visual Studio编程字体。
  Comment Reflower>Visual Studio代码评论像样意见插件。
  bxAutoZip>如果有时候使用Outlook,可以自动将附件转化成一个ZIP。
  Input Director>用一套键盘鼠标控制多台电脑工具。
  ISO Recorder>国际标准的CD/DVD刻录机。
  KatMouse>鼠标滚轮增强实用工具,其中可以在激活的和未激活的窗口之间通过简单地按压鼠标滚轮按钮进行快速切换。
  Kaxaml>Visual Studio重量级创建XAML的工具。
  PrimoPDF>PDF转换工具。
  UberIcon>酷工具,点击文件夹图标和运行程序的时候带来特别的动画效果。
  VMware Player>虚拟机。
  Picasa>照片工具。
  LingPad>学习Linq的工具。
  Vista Codecs Package>Vista的编解码器包,允许Vista的媒体播放器播放几乎任何东西。
   
FireFox增强插件  
  Firebug>最牛的火狐插件。
  Customize Google>添加额外的信息来增强Google的搜索结果。
  Download Statusbar>下载状态。
  Extended Statusbar>状态栏显示网页载入速度、百分比、时间和大小(类似Opera)的扩展。
  Locationbar2>突出显示域名,通过解码 URLs 来提高地址的可读性,可链接化URL字段,隐藏 http://, https://, ftp:// 和 file:// 字样。
  Open Download>可以从互联网上打开任何文件,类似于IE的'打开'或'运行'的文件下载功能。
  StumbleUpon>优秀插件,随机推荐优秀网站。
   
在线服务  
  GMail>电子邮件GMail。
  Google Docs>谷歌文件
  Live Mesh>微软云服务,不过只针对美国本土开放。
  谷歌翻译>谷歌中国的翻译
  优酷视频>中国视频网站
  星星音乐谷>个人歌曲列表
  迅雷看看>在线影院
  Windows Live SkyDrive>在线存储
posted @ 2008-12-03 16:19 真见 阅读(1347) | 评论 (10)编辑
     摘要: 前言 Messenger Platform 团队将在 Mix 09 上推出新的 Windows Live Messenger Web Toolkit 和 Web Bar 控件,其中Web Bar控件包含完整的 Messenger 体验,功能包括:     联系人列表 — 管理、搜索、发起对话,还支持 Favorites 联系人;    ... 阅读全文
posted @ 2009-04-30 17:51 真见 阅读(1039) | 评论 (1)编辑

微软宣布Internet Explorer 8.0 释放

中国 - 中文 简体 For Windows Server 2003 http://go.microsoft.com/fwlink/?LinkID=142202
 Windows XP
 Windows XP x64
 Windows Vista
 Windows Vista 64-bit
 Windows Server 2003
 Windows Server 2003 64-bit
 Windows Server 2008
 Windows Server 2008 64-bit
 Group Policy Settings Reference Windows Internet Explorer 8 Release Candidate 1
 Windows Internet Explorer 8 Technology Overview for Developers
 Windows Internet Explorer 8 FAQ for Business
 Windows Internet Explorer 8 Technology Overview for Enterprise and IT Pros
 Techniques for Preinstalling Windows Internet Explorer 8 whitepaper
 Windows Internet Explorer 8 Compatibility View List

 

如何让你的网站从今天开始准备迎接IE8

推荐:修改你网站的内容以支持Internet Explorer 8的默认网页视图标准,欲了解更多信息,请参阅:http://msdn.microsoft.com/zh-cn/library/cc817575.aspx
备用:让你的网站告诉Internet Explorer 8强制使用Internet Explorer 7模式。 
如果以网站为基础,请新增HTTP标头:X-UA-Compatible: IE=EmulateIE7
如果以网页为基础,请在网页的<title>标记之后添加<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

 

Windows Internet Explorer工具

 MIX09:Expression Web 团队昨宣布了一款跨浏览器测试工具 SuperPreview,,,,,,,下载Microsoft Expression Web SuperPreview
  IE7Pro
  IETester
  Internet Explorer 开发者工具栏(IE8已封装 )
 IE DebugBar( 现已无法访问 )
 Internet Explorer 谷歌工具栏
 Windows Live 工具栏

 

Web应用程序开发

 IE8的Activities,WebSlices示例--ie8.taobao.com
 IE8学习资料集合
 IE8 WebSlice 尝鲜
 实例讲解IE8新特性之webSlices
 如何创建IE8新增即时搜索建议功能Search AutoSuggestions

 Web Slice and Feed Authentication – Developer Guidelines
 Site Compatibility and IE8
 More IE8 Extensibility Improvements
 The CSS Corner: Using Filters In IE8
 IE8 Security Part VII: ClickJacking Defenses
 Accessibility: Improved ARIA Support in the IE8 RC
 The CSS Corner: Alternate Style Sheets
 New Accessibility Features in IE8
 Ending Expressions
 Updates for AJAX in IE8 Beta 2
 The IE8 IEAK
 Hello, World: Getting Started with IE8 Visual Search
 Introducing the IE8 Developer Tools JScript Profiler
 Native JSON in IE8
 Microsoft CSS Vendor Extensions
 Developer Tools in Internet Explorer 8 Beta 2
 IE8 Security Part VI: Beta 2 Update
 Introducing Compatibility View
 Introducing IE=EmulateIE7
 IE8 Security Part II: ActiveX Improvements
 Address Bar Improvements in Internet Explorer 8 Beta 1
 Activities and WebSlices in Internet Explorer 8
 The Internet Explorer 8 User-Agent StringThe Internet Explorer 8 User-Agent String (Updated Edition)

 

早前的Internet Explorer 8.0 Beta

 Internet Explorer 8 RC1发布
 Internet Explorer 8 Beta 2 发布( 追加内容 )

 

Internet Explorer 8.0 资源

Internet Explorer 8 中的新东西
 http://msdn.microsoft.com/zh-cn/library/cc288472(en-us,VS.85).aspx

Internet Explorer 8 主页
 http://www.microsoft.com/windows/internet-explorer/beta/default.aspx   

Internet Explorer MSDN开发中心
 http://msdn.microsoft.com/zh-cn/ie/default.aspx

Internet Explorer Technet技术中心
 http://technet.microsoft.com/zh-cn/ie/default.aspx

IE浏览器兼容中心
 http://msdn.microsoft.com/zh-cn/ie/cc405106.aspx

Internet Explorer 8 封锁工具包   
 http://www.microsoft.com/downloads/details.aspx?FamilyID=21687628-5806-4ba6-9e4e-8e224ec6dd8c&displaylang=en

Internet Explorer 8 准备工具包
 http://www.microsoft.com/windows/internet-explorer/beta/readiness/

Internet Explorer Administration Kit 8
 http://technet.microsoft.com/zh-cn/library/cc817437(en-us).aspx

IE Blog
 http://blogs.msdn.com/ie/

IE8 在 Channel 9
  http://channel9.msdn.com/tags/IE8/

IE8 视频
 http://www.microsoft.com/windows/internet-explorer/beta/videos.aspx

IE8 Demos   
 http://www.ie8demos.com/

IE8 加载项资源库   
 http://ieaddons.com/cn/  

IE8 中的兼容性视图列表的说明
 http://support.microsoft.com/kb/960321/

某些网站可能无法正确显示,或在 Windows Internet Explorer 8 中正常工作
 http://support.microsoft.com/kb/956197
posted @ 2009-03-20 00:06 真见 阅读(3815) | 评论 (69)编辑
btnSubmit.Attributes.Add("onclick",
ClientScript.GetPostBackEventReference(btnSubmit, "")
+ ";this.value='正在提交...';this.disabled = true;");
posted @ 2009-03-13 17:45 真见 阅读(109) | 评论 (0)编辑

前言

RSS(Really Simple Syndication)一词有时候仍大体上意为网摘,一个Syndication源采用已知的XML标准。因此,任何一台电脑都能解析Syndication数据,使用者输入RSS阅读器地址或是用滑鼠点取浏览器上指向订阅程序的RSS小图示之URI(非通常称为URL)来订阅网摘。RSS阅读器定期检阅使是否有更新,然后下载够监看用者介面。例如:cnblogs博客园-所有随笔区的阅读器更新了最近(最新)的40篇开发技术文章,你可以把它显示在你的博客。

.NET Framework在最新的3.5之前没有提供任何内置的功能,但在3.5推出System.ServiceModel.Syndication名称空间,其中一个核心类叫SyndicationFeed,它提供了如Title,Description,Links和Copyright详细信息,并通过其具体的Items属性的Item对象SyndicationItem提供详细内容。本文介绍了如何在ASP.NET3.5中使用System.ServiceModel.Syndication来为网站创建一个RSS Feeds。

版本

目前RSS规范的主要版本有0.91、1.0和2.0等。0.91版和1.0版完全不同,风格不同,制定标准的人也不同。0.91版和2.0版一脉相承。1.0版更接近XML标准。目前世界上大多数知名,虽有很多种不同的RSS,但都定型于两个重要的支干(RDF和2.*)。RDF或RSS 1.*的分支包括下列版本: RSS 0.90原本属于美国网景公司的版本。这个RSS被称为RDF Site Summary,但其基础构图建立在初期的RDF规格上,以及和末版的RDF推荐标准不相容。 RSS 1.0是一个开放式的版本,由RSS-DEV工作团队再次建立为RDF Site Summary。RSS 1.0是一个像RSS 0.90的RDF形式,但是并没有完全的和他相容,自从1.0基新闻网站都提供RSS订阅支持。

历史

RSS格式采纳之前有过几次web联合化的尝试,但都没有达到广泛的传播。关于重构web站点信息的基本思想可以追溯到早至1995年,当时Ramanathan V. Guha以及他在苹果公司高科技小组的同事开发出了元内容框架。对这些早期发展的更详细讨论,请参见网页联合供稿技术的历史

RSS的第一个版本为RDF Site Summary,在1999年三月由美国网景公司的Guha为了用在My.Netscape.Com 入口网站而开发。这个版本开始以RSS0.9为名。在1999年七月,美国网景公司的Dan Libby 发明了新版本RSS 0.91,此版本简化了形式,借由 撤去 RDF 元素及合并Dave Winer的 scriptingNews企业联合组织化格式。Libby并且将此重新命名为RSS,全名 "Rich Site Summary",并且在"futures document"论述了未来的发展形式。

这会是Netscape在RSS八年的研究中最后一次的参与,当RSS被一些想要他们的feeds被用在My.Netscape.Com 和其他早期 RSS入口的网路出版者环绕,美国“网景”公司下降RSS并支持 MY. Netscape.Com 在2001年四月期间新主人AOL的重建公司,还取消了支撑格式化的使用说明文件和工具。

创建Syndication RSS Feed网站

网站的RSS源可以是一个静态的XML文件(此方法是生成的静态文件),也可以是一个动态网页输出相应的XML标记,这里演示后者。

项目的结构图如下:

 sshot-1

新建一个Feed.aspx,.aspx页面如下:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Feed.aspx.cs" Inherits="Feed" %>
<%@ OutputCache Duration="60" VaryByParam="Type" %>

<%-- 因为不是网页,所以删除@ Page之后的HTML. 
     OutputCache表示当生成一次XML输出,在接下来的60分钟,其他请求XML的输出将存储于缓存中, –%>

然后,Feed.aspx Page_Load事件处理程序中的代码如下,数据库使用pubs 数据库,并使用LINQ to SQL作数据访问层:

 protected void Page_Load(object sender, EventArgs e)
    {
        // 获得图书表中的数据并pubdate降序排列
        PubsDataContext db = new PubsDataContext();
        var dataItems = from book in db.Titles
                        orderby book.pubdate descending
                        select book;

        // 确定显示在阅读器中最大列表数
        const int maxItemsInFeed = 10;

        // 确定是否输出一个Atom或RSS格式
        bool outputRss = (Request.QueryString["Type"] == "RSS");
        bool outputAtom = !outputRss;

        // 输出适当的ContentType
        if (outputRss)
            Response.ContentType = "application/rss+xml";
        else if (outputAtom)
            Response.ContentType = "application/atom+xml";

        // 创建RSS格式具体的属性
        SyndicationFeed myFeed = new SyndicationFeed();
        myFeed.Title = TextSyndicationContent.CreatePlaintextContent( "chinabooks.com图书网" );
        myFeed.Description = TextSyndicationContent.CreatePlaintextContent( "chinabooks.com图书网最新的图书." );
        myFeed.Links.Add(SyndicationLink.CreateAlternateLink(new Uri(GetFullyQualifiedUrl("~/Default.aspx"))));
        myFeed.Links.Add(SyndicationLink.CreateSelfLink(new Uri(GetFullyQualifiedUrl(Request.RawUrl))));
        myFeed.Copyright = TextSyndicationContent.CreatePlaintextContent( "版权所有chinabooks.com书店" );
        myFeed.Language = "en-us";

        // 创建并填充SyndicationItems
        List<SyndicationItem> feedItems = new List<SyndicationItem>();

        foreach (Title t in dataItems.Take(maxItemsInFeed))
        {
            // Atom items 必须要有author, 因此没有作者的这一项就跳到下一项
            if (outputAtom && t.TitleAuthors.Count == 0)
                continue;

            SyndicationItem item = new SyndicationItem();
            item.Title = TextSyndicationContent.CreatePlaintextContent(t.title1);
            item.Links.Add(SyndicationLink.CreateAlternateLink(new Uri(GetFullyQualifiedUrl("~/Titles.aspx"))));
            item.Summary = TextSyndicationContent.CreatePlaintextContent(t.notes);
            item.Categories.Add(new SyndicationCategory(t.type));
            item.PublishDate = t.pubdate;

            foreach (TitleAuthor ta in t.TitleAuthors)
            {
                SyndicationPerson authInfo = new SyndicationPerson();
                authInfo.Email = ta.Author.au_lname + "@example.com";
                authInfo.Name = ta.Author.au_lname+ta.Author.au_fname;
                item.Authors.Add(authInfo);

                // RSS源只能有一个作者,所以退出循环。第一个作者已经添加
                if (outputRss)
                    break;
            }

            // 添加到feedItems
            feedItems.Add(item);
        }

        myFeed.Items = feedItems;

        // 用response返回XML数据源
        XmlWriterSettings outputSettings = new XmlWriterSettings();
        outputSettings.Indent = true; //(使用注释便于阅读)
        XmlWriter feedWriter = XmlWriter.Create(Response.OutputStream, outputSettings);

        if (outputAtom)
        {
            // 使用 Atom 1.0  格式标准      
            Atom10FeedFormatter atomFormatter = new Atom10FeedFormatter(myFeed);
            atomFormatter.WriteTo(feedWriter);
        }
        else if (outputRss)
        {
            // 否则使用 RSS 2.0 格式
            Rss20FeedFormatter rssFormatter = new Rss20FeedFormatter(myFeed);
            rssFormatter.WriteTo(feedWriter);
        }

        feedWriter.Close();
    }
结果
sshot-9 

从网站的一个页面上显示另一个网站的Syndication RSS Feed

除了创建一个SyndicationFeed外,还可以使用SyndicationFeed的Load方法获取另一个网站的RSS,比如博客园:http://www.cnblogs.com/all(具体代码请下载最后给出的项目):

sshot-2

接下来

记得在网站首页的头部新增meta链接到输出feed的HTML页面。使得小RSS图标发光的显示在Web浏览器地址栏中。

<link rel="Alternate" type="application/atom+xml" href="Feed.aspx?Type=Atom" />
<link rel="Alternate" type="application/rss+xml" href="Feed.aspx?Type=RSS" />
sshot-3 

最后

Thanks Scott Mitchell,

下载项目Source 539K

posted @ 2009-02-24 17:49 真见 阅读(1280) | 评论 (2)编辑

 

前言

       如果你创建一个SQL表关系图,你就会得到许多好处。 据说最重要的好处是保护你的数据的完整性, 除了数据库,还有另一个巨大的好处:SQL表关系图使用 许多 对象/关系映射器 创建一个结构化的对象模型,例如Linq2Sql & ADO.NET实体框架都是新建的 对象/关系映射器,而这其中的关系就是你的对象模型,相当于一个数据库。因此你可以在SQL Management Studio 以及 Visual Studio 中从一个表拖动到另外一个表上。

 

创建关系

1.选择表--->某一列--->修改

zjimg1

2.右键单击--- >关系

zjimg2

3.添加--->表和列规范-->选择表和列

zjimg3

 

创建关系图

新建数据库关系图

zjimg4

 

只需要按住主键 并拖动 到它外键上,你就会看到一个指定关系的对话框

zjimg5

好处

      在视觉上是可视化的,每一个表与表 以及每一个表的每一个字段属性都一目了然。

 

Silverlight

Silverlight2.0有一个小小的更新,修补了一些小错误,其,可以在下面得到更新下载(  可以看到GDR1的版本号是2.0.40115.0):

zjimg

客户端:Silverlight 2 GDR1  runtime

如果你是安装了开发工具,你需要安装新的开发者版本:如果是装了Silverlight2.0更新的开发版将装不了GDR1的版本号是2.0.40115.0的更新 + 开发人员客户端Silverlight.2.0_Developer.exe

Silverlight 2 GDR1更新的开发工具:Microsoft® Silverlight™ Tools for Visual Studio 2008 SP1

Microsoft Silverlight 发布历史:http://download.microsoft.com/download/F/D/8/FD8F5947-78FF-40A5-9A34-5E35243C12E4/40115/Microsoft%20Silverlight%20Release%20History.html

posted @ 2009-02-20 11:54 真见 阅读(2439) | 评论 (11)编辑

现在ASP.NET 4.0已经有了培训教程:http://channel9.msdn.com/shows/10-4/10-4-Episode-3-ASPNET-WebForms-40/, 更深入的系列可以看:http://channel9.msdn.com/shows/10-4

 

ASP.NET4.0---Page新属性

ASP.NET 4.0 WebForms在Page上是增加了两个新属性,一个是Page.Keywords,一个是Page.Description。

以前是:

<head runat="server">

    <title>Untitled Page</title>

    <meta name="keywords" content="SampleKeywords" />

    <meta name="description" content="SampleDescription" />

</head>

现在是 设在页面指令顶部:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="MetaWeblogSample._Default" 
    Keywords="SampleKeywords" Description="SampleDescription"
%>

与 后台编程:

protected void Page_Load ( object sender, EventArgs e ) {
          this.Page.Keywords = "SampleKeywords";
          this.Page.Description = "SampleDescription";
          Response.Write ( "" );
 }

这里还有个简单的小工具:http://www.apogee-web-consulting.com/tools/keyword_tool.php

 

ASP.NET4.0---ASP.NET控件新增的ViewStateMode属性

至于ASP.NET 4.0为什么会这样做,可以先看看这篇文章:http://www.infoq.com/cn/news/2009/01/ASP-4-View-State, ASP.NET控件的ViewStatMode属性可能有3个值:Enabled, DisabledInherit。

除了在控件上有这个属性,在Page上也新增了:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="MetaWeblogSample._Default" 
    ViewStateMode="Disabled"
%>

posted @ 2009-02-04 15:33 真见 阅读(2188) | 评论 (13)编辑
     摘要: 前言 现在有很多在线服务的验证,我曾经就写过一篇 如何在ASP.NET中创建OpenID, 这里我再介绍如何使用Windows Live ID在ASP.NET应用程序中验证用户的身份,说穿了这也是一种特殊验证模型,也就是说当在您的网站中使用Windows Live ID登录时,此用户首先会重定向到Windows Live登录页,然后通过验证的用户Windows Live将该用户再重定向到您的网站,... 阅读全文
posted @ 2009-02-03 20:37 真见 阅读(1409) | 评论 (13)编辑

一般我们编程的时候Using默认一般做法如下:

 using System;  
 using System.Collections.Generic;  
 using System.Text.RegularExpressions;  
 using System.Net;  
 using System.IO; 

但是,有很多情况,比如,现在有2个类,类名都叫Class1,2个类在不同的名称空间,现在要在同一文件中提取这2个类,你一般做法是:

namespace  SampleClass{
     class TestClass{
         private void F(){
              Namespace.one.Class1 c1= new Namespace.one.Class1();
              Namespace.two.Class1 c2= new Namespace.two.Class1();
         }
    }
}
或者
using Namespace.one;

namespace  SampleClass{
     class TestClass{
         private void F(){
              Class1 c1= new Class1();
              Namespace.two.Class1 c2= new Namespace.two.Class1();
         }
    }
}
 

现在,有一种解决方法避免这种情况,当然也不算避免,但是可以使用更短的名字:有2中方法,第一种叫别名称,

using Namespace.one;
using T = Namespace.two;

namespace  SampleClass{
     class TestClass{
         private void F(){
              Class1 c1= new Class1();
              T.Class1 c2= new T.Class1();
         }
    }
}

第二种方法叫 别类名:

using Namespace.one;
using T = Namespace.two.Class1;

namespace  SampleClass{
     class TestClass{
         private void F(){
              Class1 c1= new Class1();
              T c2= new T();
         }
    }
}

怎么样,Class1和T那个更短,这让我想起来了现在流行的短URL服务网站兴起的重要。。

posted @ 2009-02-03 13:46 真见 阅读(189) | 评论 (0)编辑

1 

3

2

4

 5

  6

posted @ 2009-01-30 23:03 真见 阅读(81) | 评论 (3)编辑