关于第二个问题,你可以把整个类保存在Session中,不过耗内存。
第一个问题,我估计你要说清楚点别人才能看得懂。
第一个问题,我估计你要说清楚点别人才能看得懂。
解决方案 »
- 在GridView的模板列里拖拉了一个FileUpload控件,可是我在程序里怎样访问这个控件呢?
- 关于APP_Code中使用全局静态变量和类,在其他页面调用,是否有影响?
- TextMode为MultiLine,Enabled属性为false,数据过多,滚动条如何变为可用?
- 三层中的数据访问层,你用dataset还是grove呢?【回复都有分】
- 只能写SQL语句了吗?
- 根据相应的checkBoxList自动生成TextBox
- 如何取得自定义控件的一些属性值或者变量值?
- 在ASP.NET上如何使用线程机制
- 请问这是不是与没有dll文件有关?
- 天!我把我的vs.net安装源文件删除了,有办法恢复吗?
- 怎样在Asp.Net中实现框架窗口功能
- window.open
sql语句有问题
Binder的DataSource对不对??(不知道你的具体要求是什么)
2,记录用户登陆信息一般用Session或则Cookies来做就可以了。还有Session有一个超时问题,
建议你用Cookie好了。
private void Button1_Click(object sender, System.EventArgs e)
{
this.DataGrid1.Dispose();
DataGrid1.EditItemIndex = -1;
this.DataGrid1.CurrentPageIndex=0;
int num=CheckBoxList1.Items.Count;
int checkbox=0;
for(int i=0;i<num;i++)
{
if(CheckBoxList1.Items[i].Selected==true)
{
checkbox++;
}
}
if(checkbox==1)
{ this.Label1.Text=this.CheckBoxList1.SelectedItem.Text; this.Label2.Text=this.CheckBoxList1.SelectedItem.Value; strSend="select id,mobile,name,[group] as zhu from corp_group_member where [group]='"+Label1.Text+"' and fmobile='"+Label2.Text+"' order by id desc";
ds=lsqdata.dbbind(strSend); //lsqdata.dbbind()返回一个数据集
this.DataGrid1.DataSource=ds.Tables["mytable"].DefaultView;
this.DataGrid1.DataBind();
this.Label3.Text="当前组名:"+Label1.Text+" 共有:"+ds.Tables["mytable"].Rows.Count.ToString()+"条记录";
}
else
{
Response.Write("<script>alert('一次只能选取一个部门!')</script>");
}
}用户可能不断变换CheckBoxList1里选定内容,所以这样会不会出现ds里的混乱,导致datagrid里出现数据错误?