05 2012 档案
摘要:使用扩展方法,可以向一个已有类中添加新的方法. 例如, 可以创建任意方法并将它添加到string中. public static class HString { public static string ToName(this string str) { return "henw"; } }如下使用:Label1...
阅读全文
摘要:table{ table-layout: fixed;}td{ white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}原理:本方法用于解决表格单元格内容过多时的美观问题,主要涉及到4句CSS样式:1.table-layout: fixed由于table-layout的默认值是auto,即table的宽高将取决于其内容的多寡,如果内容的体积无法估测,那么最终表格的呈现形式也无法保证了,fixed一下就好了。(注意:此样式是关键)2.white-space: nowrap是为了保证无论单元格(TD)中文本内容有多少,...
阅读全文
摘要:从客户端调用后台静态方法 1.Ajax Library方式 C#代码: [WebMethod]public static DateTime GetCurrentTime(string str){ return DateTime.Now;} JS代码: <form id="form1" runat="server"> <script language=...
阅读全文
摘要:code snippet 1: function GetCurrentTime1() { 2: PageMethods.GetCurrentTime('NewEgg ajax training', CheckIsSuccess); 3: } 4: function CheckIsSuccess(result) { ...
阅读全文
摘要:博客文章 格式为:http://www.cnblogs.com/博客名/services/metaweblog.aspx 完成.
阅读全文