摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Runtime.InteropServices;using Microsoft.Win32;using System.Diagnostics;namespace ConsoleApplication1{ class Program { static void Main(string[] args) { Process p = new Proces... 阅读全文
posted @ 2013-11-03 23:55 But Success 阅读(420) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace WindowsFormsApplication17{ public partial class Form1 : Form { public Form1() { Ini... 阅读全文
posted @ 2013-10-15 09:42 But Success 阅读(656) 评论(0) 推荐(0) 编辑
摘要: 如下,经测试得到的执行步骤:第01步、内容页的 Page_PreInit第02步、母版页的 Page_Init第03步、内容页的 Page_Init第04步、内容页的 Page_InitComplete第05步、内容页的 Page_PreLoad第06步、内容页的 Page_Load第07步、母版页的 Page_Load第08步、母版页或内容页的 按钮点击等回发事件(Master或Content的Button事件不会同时触发)第09步、内容页的 Page_LoadComplete第10步、内容页的 Page_PreRender第11步、母版页的 Page_PreRender第12步、内容页的 阅读全文
posted @ 2013-03-14 10:49 But Success 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 打开VS,在Host项目中右键,新建一个App.config文件。点击菜单栏Tools选项,在下拉菜单中选择WCF Service Configuration Editor。在弹出的工具窗口中选择“File->open->Config File”。找到刚才建的App.config文件,并打开。新建一个服务,如下图所示,先点击“创建新的服务”链接,再找到Service项目中的Services.DBServices服务。点击下一步,找到Contracts项目中的IHello契约。下一步,选择Http的通信方式。点击下一步,选择Basic Web Service Interoperabi 阅读全文
posted @ 2013-01-29 15:58 But Success 阅读(349) 评论(0) 推荐(0) 编辑
摘要: 具体文章地址如下:要解决的问题: WCF入门,创建一个DBServices程序。解决方法:打开VS,创建一个空白的solution。然后依次创建下面三个项目:Contracts:类库项目,添加System.ServiceModel的引用。Services:类库项目,添加System.ServiceModel和对Contracts项目的引用。Host:控制台项目,添加System.ServiceModel和对Contracts、Services项目的引用。Client:控制台项目,添加System.ServiceModel和对Contracts、Services项目的引用。在项目上右键,Add 阅读全文
posted @ 2013-01-29 15:04 But Success 阅读(703) 评论(0) 推荐(1) 编辑
摘要: 很多人都知道SQL注入,也知道SQL参数化查询可以防止SQL注入,可为什么能防止注入却并不是很多人都知道的。本文主要讲述的是这个问题,也许你在部分文章中看到过这块内容,当然了看看也无妨。首先:我们要了解SQL收到一个指令后所做的事情:具体细节可以查看文章:Sql Server 编译、重编译与执行计划重用原理在这里,我简单的表示为:收到指令 -> 编译SQL生成执行计划 ->选择执行计划 ->执行执行计划。具体可能有点不一样,但大致的步骤如上所示。接着我们来分析为什么拼接SQL 字符串会导致SQL注入的风险呢?首先创建一张表Users:CREATE TABLE [dbo].[U 阅读全文
posted @ 2013-01-17 00:09 But Success 阅读(199) 评论(0) 推荐(0) 编辑
摘要: using System.Xml;定义公共对象:XmlDocument xmldoc ;XmlNode xmlnode ;XmlElement xmlelem ;1,创建到服务器同名目录下的xml文件:方法一:xmldoc = new XmlDocument ( ) ;//加入XML的声明段落,<?xml version="1.0" encoding="gb2312"?>XmlDeclaration xmldecl;xmldecl = xmldoc.CreateXmlDeclaration("1.0","gb23 阅读全文
posted @ 2013-01-17 00:08 But Success 阅读(219) 评论(0) 推荐(0) 编辑
摘要: select * from score_get where substring(Convert(char(10),get_time,112),1,8)='20100325'select * from score_get where get_time between '2010-03-25 00:00:00' and '2010-03-25 23:59:59'select * from score_get where year(get_time) = 2010 and month(get_time)= 03 and day(get_time) = 阅读全文
posted @ 2013-01-06 14:49 But Success 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 在〔开始〕→〔运行〕→输入〔regedit〕→〔HKEY_LOCAL_MACHINE〕 → 〔SOFTWARE〕→〔Microsoft〕→〔Windows NT〕→〔CurrentVersion〕 →〔Winlogon〕→〔SpecialAccounts〕→在〔UserList〕增加一个〔DWORD〕值 〔数值名称〕为〔Administrator〕,数值资料为〔1〕= 显示 〔0〕=隐藏 阅读全文
posted @ 2013-01-04 15:02 But Success 阅读(307) 评论(0) 推荐(0) 编辑
摘要: 最近在学习Sharpdevelop的过程中,看到了使用的很好的winform页面布局控件,感觉非常的不错。实现效果如下所示:这里我就简单的下一下他的实现步骤,当中我也看考了其他人的博客。1)创建一个windowsForm的应用程序2)添加引用:WeifenLuo.WinFormsUI.Docking他是一个DLL文件,可以自行从网络上下载。3)设置Form1窗体作为父窗体容器。设置它的:isMdiContainer属性为:true4)工具箱—>右键—>选择项—>.net组件—>浏览—>weiFenLuo.winFormsUI.Docking.dll—>在工具 阅读全文
posted @ 2013-01-04 14:21 But Success 阅读(804) 评论(0) 推荐(0) 编辑