06 2008 档案

摘要:问: 1.如何在JavaScript访问C#函数? 2.如何在JavaScript访问C#变量? 3.如何在C#中访问JavaScript的已有变量? 4.如何在C#中访问JavaScript函数? 问题1答案如下: javaScript函数中执行C#代码中的函数: 方法一:1、首先建立一个按钮,在后台将调用或处理的内容写入button_click中; 2、在前台写... 阅读全文
posted @ 2008-06-27 17:42 jay-c 阅读(166) 评论(0) 推荐(0)
摘要:首先看验证码图片输出页的代码:VerifyCode.cs protected void Page_Load(object sender, EventArgs e) { VryImgGen gen = new VryImgGen(); string verifyCode = gen.CreateVerifyCode(5, 1); S... 阅读全文
posted @ 2008-06-27 11:34 jay-c 阅读(243) 评论(0) 推荐(0)
摘要:生成html文件的方法采用的是模板途径 所以,首先建立一个模板页template.html: $Title $Title brows次 $Time $Content $Pager ... 阅读全文
posted @ 2008-06-24 11:56 jay-c 阅读(190) 评论(0) 推荐(0)
摘要:今天试了一下用存储过程取得数据。归纳方法如下: 1.使用DataSet数据源: SqlConnection conn=new SqlConnection("server=(local);uid=;password=;database="); conn.open(); SqlCommand cmd=new SqlCommand("StoreProcedure",conn); cmd.CommandT... 阅读全文
posted @ 2008-06-16 14:17 jay-c 阅读(115) 评论(0) 推荐(0)
摘要:Function SafeRequest(ParaValue) ParaValue = Trim(Request(ParaValue)) '正则表达式过滤 Set re = New RegExp '禁止使用的注入字符 re.Pattern = "\|Select|Update|Delete|insert|Count|dr... 阅读全文
posted @ 2008-06-04 08:01 jay-c 阅读(354) 评论(0) 推荐(0)
摘要:使用SafeRequest函数替换你的Request Function SafeRequest(ParaName) Dim ParaValue ParaValue=Request(ParaName) if IsNumeric(ParaValue) = True then SafeRequest=ParaValue exit Function elseIf Instr(LCase(ParaVa... 阅读全文
posted @ 2008-06-04 08:00 jay-c 阅读(590) 评论(0) 推荐(0)