<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="log.aspx.cs" Inherits="JINDIsoft.log" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<script language="c#" runat="server">
void loglog(object sender, EventArgs e)
{
string Path = @"D:\log\log.txt";
if (!System.IO.File.Exists(Path))
{
System.IO.FileStream f = System.IO.File.Create(Path);
f.Close();
f.Dispose();
}
System.IO.StreamWriter f2 = new System.IO.StreamWriter(Path, true,
System.Text.Encoding.GetEncoding("gb2312"));
f2.WriteLine(Request["st"].ToString());
f2.Close();
f2.Dispose();
}
</script>
这是前面的代码
onclick="loglog" 后面的HTML控件调用这里出的问题,是不是没读到上面的代码啊?没有定义这个错误是在浏览器里面的,但是我搞不懂他为什么说我没有定义,我明明定义了的
我写在一个aspx里的,dll没法写。public加上也不行,加上static还是不行