这是授予权限后想实现的某些功能不可用的代码:
if (Session["qx"].ToString()=="general")
{
string str="select * from General_workers where Num_worker=" +Session["Num_worker"].ToString ();
SqlDataAdapter MyCommand1 = new SqlDataAdapter(str,sqlcon);
DataRow drg ;
DataSet dst = new DataSet();
MyCommand1.Fill(dst,"General_workers");
drg=dst.Tables["General_workers"].Rows[0];
this.PQLinkButton.Enabled= false;
this.JALinkButton.Enabled= false;
this.SSLinkButton.Enabled= false;
this.DALinkButton.Enabled= false;
}
LinkButton设置成False后运行还是可用