void Session_Start(object sender, EventArgs e)
{
// 在新会话启动时运行的代码
string StrTxt;//当前的计数值
string PathStr;//计数的路径
Integer IntCount;//运行中增减的数值
Application.Lock();
PathStr=Server.MapPath("count.txt");
StrTxt = Trim(ReadText(PathStr));
if (Trim(StrTxt))=""or Not IsNumeric(Trim(StrTxt))
{ IntCount=1;
}
else
{ IntCount=Convert.ToInt32(Trim(StrTxt))+1;
}
end if
WriteText(PathStr,Convert.ToString(IntCount);
Application("currcount")=IntCount;
Application("active")=Application("active")+1;
Application.UnLock();
}
编译错误
说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。 编译器错误信息: CS1525: 无效的表达式项“=”源错误: 行 38: PathStr=Server.MapPath("count.txt");
行 39: StrTxt = Trim(ReadText(PathStr));
行 40: if (Trim(StrTxt))=""or Not IsNumeric(Trim(StrTxt))
行 41: { IntCount=1;
行 42: }
{
// 在新会话启动时运行的代码
string StrTxt;//当前的计数值
string PathStr;//计数的路径
Integer IntCount;//运行中增减的数值
Application.Lock();
PathStr=Server.MapPath("count.txt");
StrTxt = Trim(ReadText(PathStr));
if (Trim(StrTxt))=""or Not IsNumeric(Trim(StrTxt))
{ IntCount=1;
}
else
{ IntCount=Convert.ToInt32(Trim(StrTxt))+1;
}
end if
WriteText(PathStr,Convert.ToString(IntCount);
Application("currcount")=IntCount;
Application("active")=Application("active")+1;
Application.UnLock();
}
编译错误
说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。 编译器错误信息: CS1525: 无效的表达式项“=”源错误: 行 38: PathStr=Server.MapPath("count.txt");
行 39: StrTxt = Trim(ReadText(PathStr));
行 40: if (Trim(StrTxt))=""or Not IsNumeric(Trim(StrTxt))
行 41: { IntCount=1;
行 42: }
解决方案 »
- EventArgs 参数赋值问题
- girdview绑定objetdatasourse
- 求c# 正则获取网页图片
- dll里面如何封装图片?
- 关于ArrayList添加值的问题
- 对 DataGridView 的某列的单元格进行编辑时,可以控制输入的字符个数,这个怎样实现.大哥们帮帮忙.
- exe 文件运行后顺间结束,主窗体都没有显示出来
- [求助]VB6中用类似&H00C00000&表示的颜色转换到C#中使用的问题
- 请问下,插件与模块(类库)有什么区别吗?
- 一个很菜的问题,c#中有没有类似“暂停“的东东?
- 简单问题:如何查找一个值是否在一组已知关键字中?
- Singleton的C#实现,大家进来畅所欲言!
{
}
StrTxt = Trim(ReadText(PathStr));
if (Trim(StrTxt))=""or Not IsNumeric(Trim(StrTxt)) //错误,且Trim(StrTxt)与上一步重复,其他错误解
//决同2楼
{ IntCount=1;
}
else
{ IntCount=Convert.ToInt32(Trim(StrTxt))+1;
}
end if