摘要:
向网站提交页面的主要代码string postString = "arg1=a&arg2=b";//这里即为传递的参数,可以用工具抓包分析,也可以自己分析,主要是form里面每一个name都要加进来 byte[] postData = Encoding.UTF8.GetBytes(postString);//编码,尤其是汉字,事先要看下抓取网页的编码方式 string url = "http://localhost/register.php";//地址 WebClient webClient = new WebClient(); webClien 阅读全文
随笔档案-2013年11月
asp.net 生成验证码
2013-11-07 16:03 by 无抿屎的牛牛, 605 阅读, 收藏, 编辑
摘要:
1.添加一个CheckCode.ashx文件using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Drawing;namespace Yeylol.Apps.SmartHome.Back{ /// /// CheckCode 的摘要说明 /// public class CheckCode : IHttpHandler { public void ProcessRequest(HttpContext context... 阅读全文
存储过程删除主从表,回滚操作
2013-11-06 10:46 by 无抿屎的牛牛, 459 阅读, 收藏, 编辑
摘要:
用存储过程操作删除主从表记录,操作成功提交事务,失败回滚操作,避免删除异常误删数据。ALTER PROCEDURE [dbo].[CopyCustomerDelete] /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ ( @FromCustomerID int, @CustomerType int, @Result int output )AS /* SET NOCOUNT ON */BEGIN TRANSACTION... 阅读全文
Mono For Android的项目发布
2013-11-06 10:40 by 无抿屎的牛牛, 388 阅读, 收藏, 编辑
摘要:
Mono for Android的发布步骤:1.选择项目名称鼠标右键,选择Options选项。2.弹出工程选项框,选择AndroidBuild,勾选SupportedABIS里面的所有项。3.选择AndroidApplication中,选择Requiredpermissions中的AccessNetworkState手机接入网络访问权限和Internet互联网访问权限。4.在工程菜单中创建安装包,选择CreateAndroidPackage。5.最后保存到指定路径就行了。 阅读全文
存储过程 删除两表关联的数据记录
2013-11-01 17:25 by 无抿屎的牛牛, 399 阅读, 收藏, 编辑
摘要:
表Device为设备表(主表),如下图表Rxparam为参数表(从表),如下图该存储过程是查找Device表中CustomerID为62的所有设备Rxparam表对应的记录都删除。CREATE PROCEDURE CopyCustomerInfo( @FromCustomerID int, @ToCustomerID int, @CustomerType int)ASBEGIN TRANSACTION DECLARE @Error int SET @Error=0 DECLARE @DeviceCount int SET @DeviceCount=0BEG... 阅读全文