摘要:
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { System.Environment.Exit(System.Environment.ExitCode); Application.Exit(); } 阅读全文
摘要:
设当前页完整地址是: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/ 阅读全文
摘要:
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 阅读全文
摘要:
<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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
解决“在证书存储区中找不到清单签名证书”这个问题似乎以前碰到过,不过记不太清了。程序重新生成,提示错误:在证书存储区中找不到清单签名证书。可能是之前部署的程序证书被我删掉了或是证书过期了,结果出现这个问题。解决方案如下:方案1:右击项目属性—>签名—>为ClickOnce清单签名,将勾掉的选项去掉。方案2:在签名中创建一个新的签名。方案3:记事本打开相应的csproj文件,调整节点值。<SignManifests>true</SignManifests>将true修改为false。以上解决方案任选其一,我选了方案一,简单嘛。重新生成,问题搞定! 阅读全文
摘要:
iphone4 Safari实现滚动条功能以 div 使用overflow:auto 后,内容超过div高度,会出现滚动条,但在为iOS的safari上,却不显示滚动条,纠结中,最后发现,用两根手指滚动相应部分,就可以实现滚动条功能。 阅读全文
摘要:
<!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= 阅读全文
摘要:
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 阅读全文