Rain_Song
چهارشنبه 28 بهمن 1388, 18:26 عصر
سلام
برای شمارش کل کاربران کد زیر رو به کار بردم :
void Session_Start(object sender, EventArgs e)
{
Application["online"] = Convert.ToInt32(Application["online"]) + 1;
// marboot be hesab kardane kolle karbaran
SqlDataSource ds = new SqlDataSource();
ds.ConnectionString = ConfigurationManager.ConnectionStrings["connectionstring"].ConnectionString;
ds.UpdateCommand = "update usercount set cnt = cnt+1";
ds.Update();
}که در فایل global.asax قرار داره. جدول usercount هم ساختم .
به خط:
ds.ConnectionString = ConfigurationManager.ConnectionStrings["connectionstring"].ConnectionString;error میده . مشکل از کجاست ؟؟؟
برای شمارش کل کاربران کد زیر رو به کار بردم :
void Session_Start(object sender, EventArgs e)
{
Application["online"] = Convert.ToInt32(Application["online"]) + 1;
// marboot be hesab kardane kolle karbaran
SqlDataSource ds = new SqlDataSource();
ds.ConnectionString = ConfigurationManager.ConnectionStrings["connectionstring"].ConnectionString;
ds.UpdateCommand = "update usercount set cnt = cnt+1";
ds.Update();
}که در فایل global.asax قرار داره. جدول usercount هم ساختم .
به خط:
ds.ConnectionString = ConfigurationManager.ConnectionStrings["connectionstring"].ConnectionString;error میده . مشکل از کجاست ؟؟؟