写站点计数器遇到的application对象赋值的问题? 用c#写asp.net的站点计数器程序: Application["currentGuest"]+=1;或Application["currentGuest"]=count; count是整型,会出错;赋值类型不符.请指教错在哪里? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Application["currentGuest"]对象为object ,必须通过转换最好这么写 加一个属性public class XXXX:page{ public int count{ get{ if( Application["currentGuest"] == null ) return 0; return (int)Application["currentGuest"]; } set{ Application["currentGuest"] = value; } } //在函数中这么使 public void aaa() { count++; }} 请问这样的查询方式是不是所谓的参数化查询,安全吗? LIstView的分页功能只能和数据源一起使用么? 一个资源表数据量太多,怎样提高查询 散尽分数求优化和开发技巧[随意]~~ 关于网站权限问题 GridView Sorting 分页 如何用 crystal report 在 asp.net 下運行報表,在線等待 dbAdpter.Fill( dbDset, TableName );// '=' 附近有语法错误 请问怎么学习asp.net(C#)? 后台给前台gridview里的控件赋值的问题 在.net中怎样表示换行符?? 如何在后台调用前端的一个函数,在线等,马上给分。
加一个属性
public class XXXX:page
{
public int count{
get{
if( Application["currentGuest"] == null )
return 0;
return (int)Application["currentGuest"];
}
set{ Application["currentGuest"] = value; } }
//在函数中这么使
public void aaa()
{
count++;
}
}