随笔分类 -  .net

ilmerge合并多个组件(更新)
摘要:年初的一篇文章中提到过一下: http://margiex.cnblogs.com/archive/2005/01/31/100104.html 现在已经支持.net 2.0的版本了. 最近由于开发一个客户端程序用到多个DLL, 因此考虑使用ILMERGE来合并成一个, 这两天试了一下. 一个简单的示例如下: ilmerge /ndebug /target:exe /targetplatform:... 阅读全文

posted @ 2005-12-22 10:34 margiex 阅读(5176) 评论(3) 推荐(0)

a good rss for event viewer
摘要:ref:http://www.codeproject.com/aspnet/EventLogRss.asp 阅读全文

posted @ 2005-12-22 00:26 margiex 阅读(194) 评论(0) 推荐(0)

.net web service and http proxy FAQ
摘要:示例代码如下:WebProxy proxy = new WebProxy("XXX.XXX.XXX.XXx", port); proxy.Credentials = new NetworkCredential("user", "pass", "domain"); //如果是域用户认证,则可以直接用:CredentialCaches.Defau... 阅读全文

posted @ 2005-12-20 21:05 margiex 阅读(520) 评论(0) 推荐(0)

move vs2k3 to vs2k5
摘要:0. backup all your projects and code first;1. use project auto convertion;2. if possible, update the reference component to vs2k5 release version;3. before converting, remove the readonly property fro... 阅读全文

posted @ 2005-12-10 16:05 margiex 阅读(292) 评论(0) 推荐(0)

regular expression tutorial
摘要:ref: http://www.codeproject.com/dotnet/RegexTutorial.asp . Match any character except newline \w Match any alphanumeric character \s Match any whitespace character \d Match any d... 阅读全文

posted @ 2005-11-22 09:47 margiex 阅读(256) 评论(0) 推荐(0)

nunit 2.2.3 released, 支持vs2005 和.net 2.0了.
摘要:主要是提供对vs 2005 及.net 2.0的支持,同时修正了一些bug.对于没有使用vs team suite的人而言,可以将nunit集成到vs 2005 professional了.http://sourceforge.net/projects/nunit 阅读全文

posted @ 2005-11-17 08:31 margiex 阅读(343) 评论(0) 推荐(0)

common regular expressions (ref)
摘要:只能输入数字:“^[0-9]*$”只能输入n位的数字:“^\d{n}$”只能输入至少n位数字:“^\d{n,}$”只能输入m-n位的数字:“^\d{m,n}$”只能输入零和非零开头的数字:“^(0|[1-9][0-9]*)$”只能输入有两位小数的正实数:“^[0-9]+(.[0-9]{2})?$”只能输入有1-3位小数的正实数:“^[0-9]+(.[0-9]{1,3})?$”只能输入非零的正整数:... 阅读全文

posted @ 2005-11-14 20:09 margiex 阅读(287) 评论(0) 推荐(0)

start internal web server in .net 2.0
摘要:you can start it by command line:Start /B WebDev.WebServer.exe /port:7171 /path:"F:\My Web Site" 阅读全文

posted @ 2005-11-14 14:40 margiex 阅读(251) 评论(0) 推荐(0)

How to install VS 2005 and MSDN for VS 2005 on XP without SP2
摘要:Navigate to the setup subfolder on the VS 2005 DVD and run VS 2005 as follows to skip all prerequisite checks - setup.exe /NO_BSLN_CHECK -or- Launch regedit.exe Go to HKEY_LOCAL_MACHINE\System\Curr... 阅读全文

posted @ 2005-11-10 10:02 margiex 阅读(516) 评论(0) 推荐(0)

vss 2005 internet visit
摘要:1. install vss 2005 2. 要求iis 支持 asp.net 2.0, 因为VSS2005的运行库是2.0,如果同时有1.1,则要在IIS的设置将source safe的run-time改为2.0。3。在 vss administrator中建立一个新的VSS DB。然后先用本地方式打开,如D:\vss,然后在server->configure中勾上“enable sources... 阅读全文

posted @ 2005-11-09 15:54 margiex 阅读(8154) 评论(14) 推荐(0)

一个托盘程序, 简化notifyicon的使用.
摘要:引用: http://www.codeproject.com/csharp/mintraybtn.asp 阅读全文

posted @ 2005-10-13 10:24 margiex 阅读(279) 评论(0) 推荐(0)

在.net平台上运行伪JAVA
摘要:由于在一个项目局方要求使用JAVA平台, 而当前又都是.net平台的应用. 重新用JAVA开发工作量太大. 时间也来不及. 想到在.net中有url rewrite功能, 何不先"骗"过去再说, 反正只要不上服务器, 不看网页源代码, 估计要发现不太容易, 特别是对技术不懂的人.实现之后应该是输入http://host/XXX.jsp的时候,其实调用的是XXX.aspx. 对于任何页面都是如此. ... 阅读全文

posted @ 2005-10-10 17:24 margiex 阅读(1276) 评论(10) 推荐(0)

smart client auto update
摘要:试了一下appupdater,发现总是报mscorlib.XX.dll及其它DLL找不到. 网上找了一些文章,http://blog.joycode.com/percyboy/archive/2005/05/10/50636.aspx. 还是未能解决. 最后只好换一个updater组件. 找了一下,发现一个: http://csautoupdater.sourceforge.net/ 除了与app... 阅读全文

posted @ 2005-09-25 17:54 margiex 阅读(2195) 评论(5) 推荐(0)

nunit notes from TDD in .net
摘要:Test caseTest case is a self-validating programmer test that can be automatically discovered and executed independently of other test cases by a test runner. Test SuiteA test suite is a collection of... 阅读全文

posted @ 2005-09-21 09:32 margiex 阅读(599) 评论(0) 推荐(0)

apply template pattern in report or data driven page.
摘要:1. create a base control define the datagrid, query button, and export button or image; define the binddata method as virtual define the PrepareParamthe following is partial code: 1 public class Da... 阅读全文

posted @ 2005-08-30 10:36 margiex 阅读(885) 评论(1) 推荐(0)

forbid cache page in asp.net
摘要:added two lines in page_load:Response.Cache.SetCacheability(HttpCacheability.NoCache);Response.Cache.SetAllowResponseInBrowserHistory(false); 阅读全文

posted @ 2005-08-18 17:05 margiex 阅读(486) 评论(2) 推荐(0)

asp.net 中使用iframe动态加载页面
摘要:step1: 添加下列代码到ASPX页面:step2 此时aspx.cs中会有:protected System.Web.UI.HtmlControls.HtmlGenericControl frame1; 添加下列行到page_load事件中:HtmlControl frame1 = (HtmlControl)this.FindControl("frame1");step3在需要动态变更页面的地... 阅读全文

posted @ 2005-08-01 22:37 margiex 阅读(8459) 评论(6) 推荐(0)

treeview 的使用心得
摘要:技巧一: 可以设置在treeview的node上的点击事件,包括单击, 展开, 收缩, 双击, 右键单击等.采用的方法是通过服务器端注册客户端事件,代码如下: tvMenu.Attributes.Add("onselectedindexchange", "TVChangeIndex();"); 这是服务器端注册部分, 添加到page_load事件中. 以下为客户端代码: 详细示例请见: http... 阅读全文

posted @ 2005-07-26 16:37 margiex 阅读(6098) 评论(3) 推荐(0)

recommend a wait button on web page
摘要:针对长时间的页面操作,加上一个提示等待按钮还是很有用的,而且此按钮可以防止用户多次提交.file: http://www.cnblogs.com/files/margiex/pleaseWaitButton_demo.zip 阅读全文

posted @ 2005-07-08 00:31 margiex 阅读(406) 评论(1) 推荐(0)

recommend a cool calendar
摘要:在原有基础上修改了几个BUG和加强了客户端JS的作用, 有问题请及时反馈,谢谢.原文出处: http://www.codeproject.com/aspnet/CoolCalendar.asp更新后的文件下载: http://www.cnblogs.com/files/margiex/CoolCalendarDemo.rar 阅读全文

posted @ 2005-07-08 00:16 margiex 阅读(296) 评论(0) 推荐(0)