
asp.net
文章平均质量分 53
zjsunshine
媒体
展开
-
如何将Byte()数组中的数据直接转换为String类型的数据,数据格式问题
我在VB.net中读出了一部分数据将其存入Byte()数组中现在我需要将这个Byte数组中所有的的数据转换为一个字符串数据(String),请问有什么办法 --------------------------------------------------------------- 首先你要弄清楚你的byte中的编码是什么方式,是Unicode,还是ASCII等等,然后用System.Tex转载 2006-12-29 10:21:00 · 1612 阅读 · 0 评论 -
asp.net 调用外部程序
<!--google_ad_client = "pub-5186257027655535";/* 728x90, 创建于 08-9-16 */google_ad_slot = "8128559615";google_ad_width = 728;google_ad_height = 90;// -->Process p = new Pro转载 2009-11-08 16:09:00 · 356 阅读 · 0 评论 -
js代码不执行的奇怪问题,原因居然在global.asax
void Application_EndRequest(Object sender, EventArgs e) { Response.Write("©2009 "); } 这些代码导至 不被执行.原创 2009-06-06 15:59:00 · 486 阅读 · 0 评论 -
自己写的asp.net常用代码
#region 判断字符串是否为数字 public static bool isNumber(string sourcestr) { bool tag = true; foreach(char chr in sourcestr) { i原创 2009-06-04 17:15:00 · 233 阅读 · 0 评论 -
ASP.NET2.0 验证cookie详解
对于ASP.NET Forms验证,想必大家都非常的熟悉。然而,在控制用户的(过期时间)expired time的时候,你是否遇到过一些奇怪的现象呢?虽说只是一个小小的cookie,但是其中可能有很多的东西你都不知道。今天我将和大家详细讨论一下cookie的注意点。 在ASP.NET 的Forms验证中,通常我们会使用ASP.NET自带的Login控件来进行验证。同时,在web.con转载 2009-03-06 23:51:00 · 219 阅读 · 0 评论 -
webform_postbackoptions
最简单的办法是设置控件的causesvalidation为false原创 2009-01-07 14:36:00 · 263 阅读 · 0 评论 -
获取用户自定义控件属性值
<!--google_ad_client = "pub-5186257027655535";/* 728x90, 创建于 08-9-16 */google_ad_slot = "8128559615";google_ad_width = 728;google_ad_height = 90;//--><script type="text/javascript"sr原创 2008-10-14 22:50:00 · 809 阅读 · 1 评论 -
.net中前台javascript与后台c#函数相互调用问题
<!--google_ad_client = "pub-5186257027655535";/* 728x90, 创建于 08-9-16 */google_ad_slot = "8128559615";google_ad_width = 728;google_ad_height = 90;//--><script type="text/javascript"sr转载 2008-10-17 23:53:00 · 459 阅读 · 0 评论 -
ASP.NET 修改Global.asax文件,防SQL注入式攻击
<!--google_ad_client = "pub-5186257027655535";/* 728x90, 创建于 08-9-16 */google_ad_slot = "8128559615";google_ad_width = 728;google_ad_height = 90;//--><script type="text/javascript"sr转载 2008-09-27 14:29:00 · 1418 阅读 · 0 评论 -
Web.config详解
<!--google_ad_client = "pub-5186257027655535";/* 728x90, 创建于 08-9-16 */google_ad_slot = "8128559615";google_ad_width = 728;google_ad_height = 90;// --> 所有.NET配置文件所必须转载 2009-11-08 16:12:00 · 172 阅读 · 0 评论 -
ASP.NET中文件上传下载方法集合
<!--google_ad_client = "pub-5186257027655535";/* 728x90, 创建于 08-9-16 */google_ad_slot = "8128559615";google_ad_width = 728;google_ad_height = 90;// --> 文件的上传下载是我们在实际项目开发过程中经常需要用到的技转载 2009-11-08 16:17:00 · 176 阅读 · 0 评论 -
网站启用gzip压缩
1.什么是GZIP答:GZIP最早由Jean-loup Gailly和Mark Adler创建,用于UNIX系统的文件压缩。我们在Linux中经常会用到后缀为.gz的文件,它们就是GZIP格式的。现今已经成为Internet 上使用非常普遍的一种数据压缩格式,或者说一种文件格式。HTTP协议上的GZIP编码是一种用来改进WEB应用程序性能的技术。大流量的WEB站点常常使用GZIP压缩技术来让转载 2010-05-12 17:48:00 · 1018 阅读 · 0 评论 -
判断上传文件类型是否合法(非扩展名)
using System.Collections.Generic;using System.Web.UI.WebControls;using System.IO;namespace Pack.Common...{ public enum FileExtension ...{ JPG = 255216, GIF = 717转载 2010-03-23 20:04:00 · 321 阅读 · 0 评论 -
Request.form及querystring用法
<!--google_ad_client = "pub-5186257027655535";/* 728x90, 创建于 08-9-16 */google_ad_slot = "8128559615";google_ad_width = 728;google_ad_height = 90;// -->当用户填写页面内容时所提供的全部值,或在浏览器地址栏输入在UR转载 2009-12-08 02:46:00 · 1393 阅读 · 0 评论 -
javascript调试莫名其妙的失败
今天拷贝了一段以前写的javacript 代码,代码以前运行很正常,但今天拷贝过来以后莫名其妙的提示错误.折腾了一个晚上终于发现,以前写的代码保存的文本格式是ansi的,而现在的是utf8的。把以前的文件拷贝后打开文件然后另存为utf8格式文件,再拷贝到新的页面上就搞定了。原创 2009-11-25 00:56:00 · 319 阅读 · 0 评论 -
网页自动登录
<!--google_ad_client = "pub-5186257027655535";/* 728x90, 创建于 08-9-16 */google_ad_slot = "8128559615";google_ad_width = 728;google_ad_height = 90;// -->网页自动登录(提交Post内容)的用途很多,如验证身份、程转载 2009-11-07 13:14:00 · 555 阅读 · 2 评论 -
ASP.NET实现从服务器下载文件(记录)
<!--google_ad_client = "pub-5186257027655535";/* 728x90, 创建于 08-9-16 */google_ad_slot = "8128559615";google_ad_width = 728;google_ad_height = 90;// -->假设在服务器的根目录下有个名为Down原创 2009-11-08 18:55:00 · 2489 阅读 · 0 评论 -
ASP.NET2.0利用httphandler实现URL重写(伪URL及伪静态)
<!--google_ad_client = "pub-5186257027655535";/* 728x90, 创建于 08-9-16 */google_ad_slot = "8128559615";google_ad_width = 728;google_ad_height = 90;// --> 我们有时候会见到这样的地址:转载 2009-11-08 16:20:00 · 417 阅读 · 0 评论 -
C#代码与javaScript函数的相互调用
C#代码与javaScript函数的相互调用问:1.如何在JavaScript访问C#函数?2.如何在JavaScript访问C#变量?3.如何在C#中访问JavaScript的已有变量?4.如何在C#中访问JavaScript函数?问题1答案如下:javaScript函数中执行C#代码中的函数:方法一:1、首先建立一个按钮,在后台将调用或处理的内容写入button_click原创 2009-11-08 16:19:00 · 253 阅读 · 0 评论 -
form验证的关键代码
FormsAuthenticationTicket objTicket; HttpCookie objcookie=new HttpCookie(".ASPXAUTH"); objTicket=new FormsAuthenticationTicket(1,txtusername.Text,原创 2008-10-16 21:44:00 · 352 阅读 · 0 评论 -
C# 的ToString() 参数详解
货币2.5.ToString("C")¥2.50D十进制数25.ToString("D5")00025E科学型25000.ToString("E")2.500000E+005 F固定点25.ToString("F2")25.00G常规2.5.ToString("G")2.5N数字2500000.ToString转载 2008-10-15 19:23:00 · 954 阅读 · 0 评论 -
ASP.NET中文件上传下载方法集合(较为详细的介绍 转)
<!--google_ad_client = "pub-5186257027655535";/* 728x90, 创建于 08-9-16 */google_ad_slot = "9722383401";google_ad_width = 728;google_ad_height = 90;//--><script type="text/javascript"sr转载 2007-05-31 10:32:00 · 399 阅读 · 0 评论 -
ASP.NET程序中常用的三十三种代码
1. 打开新的窗口并传送参数:传送参数:response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)</script>")接收参数:string a = Request.QueryString("id");string b = Request.QueryString("原创 2007-04-14 20:49:00 · 362 阅读 · 0 评论 -
使用 HttpWebRequest 向网站提交数据
HttpWebRequest 是 .net 基类库中的一个类,在命名空间 System.Net 下面,用来使用户通过 HTTP 协议和服务器交互。 HttpWebRequest 对 HTTP 协议进行了完整的封装,对 HTTP 协议中的 Header, Content, Cookie 都做了属性和方法的支持,很容易就能编写出一个模拟浏览器自动登录的程序。 程序使用 HTTP 协议和服务器交互主要是原创 2007-04-14 20:44:00 · 487 阅读 · 0 评论 -
全面剖析C#正则表达式
到目前为止,许多的编程语言和工具都包含对正则表达式的支持,当然.NET也不例外,.NET基础类库中包含有一个名称空间和一系列可以充分发挥规则表达式威力的类。 正则表达式的知识可能是不少编程人员最烦恼的事儿了。如果你还没有规则表达式方面的知识的话,建议从正则表达式的基础知识入手。前参见 正则表达式语法。 下面就来研究C#中的正则表达式,C#中的正则转载 2007-04-14 21:56:00 · 919 阅读 · 0 评论 -
正则表达式基础知识
正则表达式基础知识 一个正则表达式就是由普通字符(例如字符 a 到 z)以及特殊字符(称为元字符)组成的文字模式。该模式描述在查找文字主体时待匹配的一个或多个字符串。正则表达式作为一个模板,将某个字符模式与所搜索的字符串进行匹配。如: JScript VBScript转载 2007-04-14 21:54:00 · 325 阅读 · 0 评论 -
Repeater和DataGrid相互嵌套三层及对第三层的控制
<!--google_ad_client = "pub-5186257027655535";/* 728x90, 创建于 08-9-16 */google_ad_slot = "9722383401";google_ad_width = 728;google_ad_height = 90;//--><script type="text/javascript"sr原创 2007-07-13 11:42:00 · 1248 阅读 · 1 评论 -
Visual C#常用函数和方法集汇总
1、DateTime 数字型 System.DateTime currentTime=new System.DateTime(); 1.1 取当前年月日时分秒 currentTime=System.DateTime.Now; 1.2 取当前年 int 年=currentTime.Year; 1.3 取当前月 int 月=currentTime.Month; 1.4转载 2007-01-16 13:30:00 · 378 阅读 · 0 评论 -
.NET 数据访问架构指南
转载 2006-12-29 10:27:00 · 414 阅读 · 0 评论 -
显示数据库中Iimage字段的图片内容
<!--google_ad_client = "pub-5186257027655535";/* 728x90, 创建于 08-9-16 */google_ad_slot = "9722383401";google_ad_width = 728;google_ad_height = 90;//--><script type="text/javascript"sr原创 2007-09-16 00:36:00 · 342 阅读 · 0 评论 -
不通过后辍判断文件是否是图片
<!--google_ad_client = "pub-5186257027655535";/* 728x90, 创建于 08-9-16 */google_ad_slot = "8128559615";google_ad_width = 728;google_ad_height = 90;//--><script type="text/javascript"sr转载 2008-08-21 11:41:00 · 257 阅读 · 0 评论 -
C#DataTime格式转换
<!--google_ad_client = "pub-5186257027655535";/* 728x90, 创建于 08-9-16 */google_ad_slot = "8128559615";google_ad_width = 728;google_ad_height = 90;//--><script type="text/javascript"sr转载 2008-09-21 19:49:00 · 1574 阅读 · 0 评论 -
用CSS实现圆角效果的几种方法
<!--google_ad_client = "pub-5186257027655535";/* 728x90, 创建于 08-9-16 */google_ad_slot = "8128559615";google_ad_width = 728;google_ad_height = 90;//--><script type="text/javascript"sr转载 2008-09-18 21:48:00 · 738 阅读 · 0 评论 -
用javascript动态设置对象的class的通用方法
xmlns="http://www.w3.org/1999/xhtml">改变javascript:;" onClick="javascript:tagshow(event, %B6%D4%CF%F3);" target="_self">对象的样式class.c1{font-size:15px; color:blue; font-weight:bold}.c2{font-size:18px;转载 2008-09-10 22:41:00 · 1963 阅读 · 0 评论 -
C#三种模拟自动登录和提交POST信息的实现方法
<!--google_ad_client = "pub-5186257027655535";/* 728x90, 创建于 08-9-16 */google_ad_slot = "8128559615";google_ad_width = 728;google_ad_height = 90;//--><script type="text/javascript"sr转载 2008-09-12 22:24:00 · 274 阅读 · 0 评论 -
关于split分割字符串,空结果不能得到的问题收藏
<!--google_ad_client = "pub-5186257027655535";/* 728x90, 创建于 08-9-16 */google_ad_slot = "9722383401";google_ad_width = 728;google_ad_height = 90;//--><script type="text/javascript"原创 2008-09-10 22:43:00 · 285 阅读 · 0 评论 -
C#的6种常用集合类大比拼
<!--google_ad_client = "pub-5186257027655535";/* 728x90, 创建于 08-9-16 */google_ad_slot = "8128559615";google_ad_width = 728;google_ad_height = 90;//--><script type="text/javascript"sr转载 2008-09-10 22:37:00 · 245 阅读 · 0 评论 -
asp.net常用js(二)
JavaScript代码/// /// 函数名:OpenWebForm /// 功能描述:打开WEB窗口 /// /// WEB窗口 /// 是否全屏幕 public static voi转载 2008-09-08 21:40:00 · 365 阅读 · 0 评论 -
asp.net常用js(一)
JavaScript代码using System; using System.Web; using System.Web.UI.HtmlControls ; using System.Web.UI; namespace Web.JScript { /// /// 提供向页面输出客户端代码实转载 2008-09-08 21:39:00 · 295 阅读 · 0 评论 -
asp.net使用access存储过程时报标准表达式中数据类型不匹配
1.时间类型需要用"#"括起来如 "#2010-8-25#2.程序后台paramenters添加参数需要与存储过程的参数顺序一致。如 access中 insert into (uid,btime,content) values(@uid,@btime,@content)则后台代码中cmd.parameters.add的顺序得是uid,btime,content原创 2010-08-25 14:24:00 · 532 阅读 · 0 评论