会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
nicesoft
博客园
首页
新随笔
联系
管理
订阅
上一页
1
2
3
4
5
6
7
8
下一页
2011年12月14日
C# 退出程序时,强制结束线程
摘要: private void Form1_FormClosing(object sender, FormClosingEventArgs e) { System.Environment.Exit(System.Environment.ExitCode); Application.Exit(); }
阅读全文
posted @ 2011-12-14 10:06 nicesoft
阅读(1141)
评论(0)
推荐(0)
2011年12月13日
asp.net获取当前网址url
摘要: 设当前页完整地址是:http://www.jb51.net/aaa/bbb.aspx?id=5&name=kelli "http://"是协议名 "www.jb51.net"是域名 "aaa"是站点名 "bbb.aspx"是页面名(文件名) "id=5&name=kelli"是参数 【1】获取 完整url (协议名+域名+站点名+文件名+参数)代码如下:string url=Request.Url.ToString(); url= http://www.jb51.net/aaa/
阅读全文
posted @ 2011-12-13 14:31 nicesoft
阅读(81541)
评论(2)
推荐(9)
2011年12月7日
aspx页面生成html
摘要: ToHtml.aspxprotected void Page_Load(object sender, EventArgs e) { //使用示例: //ToHtml.aspx?src=default.aspx 生成default.html //ToHtml.aspx?src=default.aspx?tag=index.html 生成index.html string source = Request.Params["src"]; string target = Request.Params["tag"]; if (target == null || t
阅读全文
posted @ 2011-12-07 00:02 nicesoft
阅读(395)
评论(0)
推荐(0)
2011年12月6日
模板替换
摘要: <htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>无标题页</title></head><body>标题:$title<br/>内容:$content</body></html>publicstaticstringWriteFileMethod(){stringpath=HttpContext.Current.Server.MapPath("test/");Encodingcode=Enc
阅读全文
posted @ 2011-12-06 21:49 nicesoft
阅读(292)
评论(0)
推荐(0)
2011年12月4日
泛型委托
摘要: public static void TraditionalDelegateSyntax() { List<int> list = new List<int>(); list.AddRange(new int[] { 1, 5, 10, 20, 33 }); Predicate<int> callback = new Predicate<int>(IsEvenNumber);//使用传统委托语法调用FindAll List<int> evenNumbers = list.FindAll(callback); foreach (int
阅读全文
posted @ 2011-12-04 21:19 nicesoft
阅读(146)
评论(0)
推荐(0)
搜索技巧2011
摘要: 1.双引号:完全匹配2.减号:不包含 减号前面必须是空格,减号后面没有空格,紧跟要排除的词3.星号:通配符(baidu不支持) 例:“搜索*擎”4.inurl:出现在URL中的页面 例:“inurl:soft”5.inanchor:链接锚文字中包含搜索词的页面(baidu不支持)6.intitle:页面title中包含关键词7.allintitle: 页面标题中包含多组关键词。例:“alintitle:SEO 搜索引擎优化” 即要包含SEO 也要包含搜索引擎优化8.allinurl:与allintitle类似9.filetype:特定文件格式 百度只支持:pdf,doc,xls,ppt,rtf
阅读全文
posted @ 2011-12-04 14:54 nicesoft
阅读(485)
评论(0)
推荐(0)
2011年12月3日
解决“在证书存储区中找不到清单签名证书”
摘要: 解决“在证书存储区中找不到清单签名证书”这个问题似乎以前碰到过,不过记不太清了。程序重新生成,提示错误:在证书存储区中找不到清单签名证书。可能是之前部署的程序证书被我删掉了或是证书过期了,结果出现这个问题。解决方案如下:方案1:右击项目属性—>签名—>为ClickOnce清单签名,将勾掉的选项去掉。方案2:在签名中创建一个新的签名。方案3:记事本打开相应的csproj文件,调整节点值。<SignManifests>true</SignManifests>将true修改为false。以上解决方案任选其一,我选了方案一,简单嘛。重新生成,问题搞定!
阅读全文
posted @ 2011-12-03 00:21 nicesoft
阅读(52795)
评论(3)
推荐(13)
2011年12月1日
iphone4 Safari实现滚动条功能
摘要: iphone4 Safari实现滚动条功能以 div 使用overflow:auto 后,内容超过div高度,会出现滚动条,但在为iOS的safari上,却不显示滚动条,纠结中,最后发现,用两根手指滚动相应部分,就可以实现滚动条功能。
阅读全文
posted @ 2011-12-01 18:41 nicesoft
阅读(1365)
评论(0)
推荐(0)
web局部打印
摘要: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title></head><script type=
阅读全文
posted @ 2011-12-01 11:50 nicesoft
阅读(286)
评论(0)
推荐(0)
2011年11月30日
获得GridView模板列中控件所在行
摘要: protected void gvProList_RowCommand1(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "UpdateQty") { int orderDetailId = int.Parse(e.CommandArgument.ToString()); ImageButton btn = e.CommandSource as ImageButton; GridViewRow gvr = btn.NamingContainer as GridViewRow; //int r
阅读全文
posted @ 2011-11-30 13:10 nicesoft
阅读(372)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
下一页