易截截图软件、单文件、免安装、纯绿色、仅160KB

asp.net 写系统日志

在注册表 System->CurrentControlSet->Services->Eventlog 处选择添加系统中 AspNet 这个账户注意是在右键的 安全->权限->添加
写日志
 public static void Log(string sourceName, string message)
    {
        EventLog eventLog = null;
       
        if (!(EventLog.SourceExists(sourceName)))
        {
            EventLog.CreateEventSource(sourceName, sourceName + "Log");
        }
        if (eventLog == null)
        {
            eventLog = new EventLog(sourceName + "Log");
            eventLog.Source = sourceName;
          
        }
        eventLog.WriteEntry(message, System.Diagnostics.EventLogEntryType.Information);
    }
sourceName 为日志名


相关文档:

用json格式返回自定义对象。(jQuery asp.net)

客户端用一个html页面调用一个ashx文件(一般http处理程序),返回json格式的自定义对象:
html:--------------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w ......

Cascading DropDownLists With ASP.NET and jQuery


Cascading drop down lists is a really nice feature for web developers. I thought it was time to write an article on how to do this using ASP.NET and jQuery. Well here’s one way of doing it. Before we get started, this example uses the latest version of jQuery which is 1.3.2.&n ......

Asp.net常用函数表

Abs(number) 取得数值的绝对值。
Asc(String) 取得字符串表达式的第一个字符ASCII 码。
Atn(number) 取得一个角度的反正切值。
CallByName (object, procname, usecalltype,[args()]) 执行一个对象的方法、设定或传回对象的属性。
CBool(expression) 转换表达式为Boolean 型态。
CByte(expression) 转换表达式为B ......

关于asp.net Session丢失问题的总结 【转】

asp中Session的工作原理:
asp的Session是具有进程依赖性的。ASP Session状态存于IIS的进程中,也就是inetinfo.exe这个程序。所以当inetinfo.exe进程崩溃时,这些信息也就丢失。另外,重起或者关闭IIS服务都会造成信息的丢失。
asp.net Session的实现
asp.net的Session是基于HttpModule技术做的,HttpModule可以在请求被 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号