开源一个ASP.NET记录**.LOG的类
using System;
using System.Collections.Generic;
using System.Text;
namespace PublicClass
{
public static class Log
{
public static void WriteLine(string line)
{
try
{
System.Diagnostics.Debug.Assert((line != null), " public static void WriteLine(string line) line 不能为空!");
line = String.Format("#############{0}################## \r\n{{\r\n {1} \r\n}}\r\n", DateTime.Now.ToString(), line);
line += "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\r\n\r\n\r\n";
line = "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\r\n" + line;
lock (line)
{
//增加每一天记录一个Log文件
string FileName = string.Format("~/Sys_Log/{0}.log", DateTime.Now.ToString("yyyy-MM-dd"));
string FilePath=System.Web.HttpContext.Current.Request.MapPath(FileName);
相关文档:
在Web编程过程中,存在着很多安全隐患。比如在以前的ASP版本中,Cookie为访问者和编程者都提供了方便,并没有提供加密的功能。打开IE浏览器,选择“工具”菜单里的“Internet选项”,然后在弹出的对话框里单击“设置”按钮,选择“查看文件”按钮,在弹出的窗口中,就会显示硬盘里 ......
1,如果是只安装了.net framework 1.1 在iis中是不显示那个选项卡的。默认就会支持asp.net1.1。在安装了.net framework 2.0后,iis站点属性里才会有asp.net的选项。
2,安装asp.net2.0后,请关闭iis窗口,重新打开iis,iis站点属性里才会有asp.net的选项
3,如果还没有,那么就要重新在IIS中注册asp.net,方法如下: ......
在asp.net中使用FCKeditor,简单实用配置。
在下已经成功配置并使用,全部功能均可用,包含上传图片等。
在下环境
1.Microsoft Visual Web Developer 2005
2.FCKeditor.Net_2.6.3.zip 下载地址:http://download.csdn.net/source/1833985
3.FCKeditor_2.6.5.zip 下载地址:http://download.cs ......
到软件公司学IT技术http://www.tsp2c.cn/
Ajax 应该不是一项技术,是一种思想而已,跟 ASP.NET 以及其它 Web 开发语言没有什么太大关系,这里只是谈谈 ASP.NET 中目前使用的 Ajax 技术以及其它一些实现 Ajax 的优秀框架。
Ajax 已经很流行一阵子了,现在谈 Ajax 觉得有点老土。目前所谓的 Web2.0 网站,基本上没有不 ......
OnClientClick="this.disabled=true;this.form.submit();" UseSubmitBehavior="False"在按钮属性中加入这段代码
this.btnSubmit.Attributes["onclick"] = this.GetPostBackEventReference(this.btnSubmit) + ";this.disabled=true;";
如果是提交是一个Button,可以使用javascript,设置为en ......