摘要: 为配合前人修改的东西,使用两种编程语言return len=1 返回的是 int但是 vb中 return len=1 返回的是boolean 阅读全文
posted @ 2012-11-20 17:44 AllanChen 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 一般情况下,我们定义的一个SqlParameter参数数组,如: SqlParameter[] parms = { new SqlParameter("@DateTime1", dtBegin), new SqlParameter("@DateTime2", dtEnd) };如果只给一个SqlCommand使用,这种情况的参数使用,不会出现异常,但如果该参数数组同时给两个Sqlcommand使用,就会出现如下异常: System.ArgumentException: 另一个SqlParameterCollection中已包含SqlParameter。 阅读全文
posted @ 2012-11-17 07:53 AllanChen 阅读(411) 评论(0) 推荐(0) 编辑
摘要: 做一个小网页,要把EXCEL中的内容导入到GridView中,而起还并不是单纯的显示出来就OK了,还要根据要求动态的在GridView显示因为GridView的每一列绑定于哪一个数据字段,根本不清楚!还好有前人留下的点点滴滴,终于完成了!!此段代码是吧EXCEL的数据导入到一个数据集中!这点相对简单,各个地方都有代码可COPYstring mystring = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source='" + savePath + "';Extended properties=Excel 8.0 阅读全文
posted @ 2012-08-09 11:02 AllanChen 阅读(438) 评论(0) 推荐(0) 编辑
摘要: ASP.NET AjaxPro的应用1、首先下载AjaxPro组件。并将AjaxPro.dll引用到网站(或项目)。2、修改Web.config。在 <system.web> 元素中添加以下代码。<configuration> <system.web> <httpHandlers> <!-- Register the ajax handler --> <add verb="*" path="ajaxpro/*.ashx" type="AjaxPro.AjaxHandlerFact 阅读全文
posted @ 2012-07-28 12:28 AllanChen 阅读(672) 评论(0) 推荐(0) 编辑
摘要: 第一:private void Button1_Click( object sender, System.EventArgs e ) { Response.Redirect( Request.Url.ToString( ) );}第二:private void Button2_Click( object sender, System.EventArgs e ) { Response.Write( " <script language=javascript>window.location.href=document.URL; </script>" ); 阅读全文
posted @ 2012-07-13 16:09 AllanChen 阅读(6482) 评论(0) 推荐(0) 编辑
摘要: HttpContext.Current.Request.Url.PathAndQuery1、通过ASP.NET获取 如果测试的url地址是http://www.test.com/testweb/default.aspx, 结果如下: Request.ApplicationPath: /testweb Request.CurrentExecutionFilePath: /testweb/default.aspx Request.FilePath: /testweb/default.aspx Request.Path: /testweb/default.aspx Request.PhysicalA 阅读全文
posted @ 2012-07-13 16:08 AllanChen 阅读(1957) 评论(1) 推荐(0) 编辑
摘要: Imports System.Runtime.Serialization.JsonImports System.IOPartial Class _Default Inherits System.Web.UI.Page Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim strTest As String 'strTest = "{""name"":""Peg 阅读全文
posted @ 2012-06-14 01:12 AllanChen 阅读(2025) 评论(0) 推荐(0) 编辑
摘要: Imports System.Runtime.Serialization.JsonImports System.IOPartial Class _Default Inherits System.Web.UI.Page Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim strTest As String strTest = "{""name"":""Peggy&qu 阅读全文
posted @ 2012-06-14 00:22 AllanChen 阅读(539) 评论(0) 推荐(0) 编辑
摘要: 转载来的:1、 浏览器ASP文件请求->服务器执行->遇到response.redirect语句->服务器发送response.redirect后面的地址给客户机端的浏览器->浏览器请求执行新的地址2、 浏览器ASP文件请求->服务器执行->遇到Server.Transfer语句->服务器转向新的文件切换对象:Server.Transfer方法与Redirect方法相比另一个显著的优势是在页面转换时,Request集合里的内容不会丢失,这给我们编程带来很大的方便。一般的情况下尽可能用Server.Transfer方法(前提是服务器是IIS),Serve 阅读全文
posted @ 2012-06-12 00:32 AllanChen 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 解决方法表 1. 具有相同版本号以及用相同密钥签署的 Office 2003 应用程序和组件类型库Office 2003 应用程序或组件主 Interop 程序集名主 Interop 程序集命名空间Microsoft Access 11.0 Object LibraryMicrosoft.Office.Interop.Access.dllMicrosoft.Office.Interop.AccessMicrosoft Excel 11.0 Object LibraryMicrosoft.Office.Interop.Excel.dllMicrosoft.Office.Interop.Excel 阅读全文
posted @ 2012-05-26 08:58 AllanChen 阅读(2792) 评论(0) 推荐(1) 编辑