摘要:
作者: 喻凯设计网站的时候,不可能我们的网站不出现一点错误,常见的“页面不存在”“页面运行出错”等错误信息一般网站多少总是存在的,关键是,这些错误出现以后,管理员怎样方便及时的发现它们、尽量减少用户对网站的不好印象。不管是IIS 4还是IIS 5,我们都可以设置网站的“自定义错误信息”,通过这样的设置,一些系统默认的比较不友好... 阅读全文
摘要:
1在.cs中执行存储过程23try45{}67catch(Exceptionex)8{9cm.Connection.Close();10qiao.Value="fail";11PublicUnit.SaveError(ex,this.Context,this.Request);12}13141516写日志的编写1718publicstaticvoidSaveError(Exceptionex,Ht... 阅读全文
摘要:
1/*Copyrightall(c)2005ZhongFeng,http://blog.csdn.net/SW515*/2publicclassValidateCode:System.Web.UI.Page3{4privatevoidPage_Load(objectsender,System.EventArgse)5{6this.CreateCheckCodeImage(GenerateCheck... 阅读全文
摘要:
1首先先建立一个新类(如:CreateImage.cs),然后在这个类中写入下面的代码2//引用3usingSystem.Drawing;4usingSystem.Web;5//执行代码6publicstaticvoidDrawImage()7{8CreateImageimg=newCreateImage();9HttpContext.Current.Session["CheckCode"]=im... 阅读全文
摘要:
12实现邮件群发功能34//邮件群发功能5界面主要有TextBox(TextBox_name),ListBox(ListBox_name),Button(Button_sent)等一些控件,6ListBox里面为所有的用户或是好友,TextBox里面为所选择的用户或好友(可以多选择,用逗号分隔开),Button为发送按钮7//添加引用8usingSystem.Data.SqlClient;9usi... 阅读全文
摘要:
最近做简历系统时遇到照片的问题,毫无疑问,这是个一对一的关系,如何使插入数据库的图片名唯一?姓名?NO,姓名可能重名。可以用时间,只要精确到秒,就不能重名了。 原理大概如此,代码因为初学,所以可能。。,不管如何,我还是决定贻笑大方了,^_^//File1,HTML控件中的上传控件 string fullFileName=this.File1.PostedFile.FileName;//strin... 阅读全文
摘要:
1 using System; 2 using System.Drawing; 3 using System.Drawing.Imaging; 4 using System.Windows.Forms; 5 6 namespace GraphicsCopyright 7 { 8 /// 9 /// Summary description for ... 阅读全文