首先声明,我是一个新手,第一次来这里,提出的问题很低,但是希望大家帮助,谢谢~在一个网页中,进行了一次查询,将查询结果放入到dataset(这个过程,因为是查询学生的信息,此时查询结果中,可能有一个学生,也可能有多个学生,参数的传递我搞不懂,于是找了个懒方法,用session保存数据)首先,我判断了
if(myDs != null)
{
session["myDs1"] = myDs; Response.Redirect("~/wangye2.aspx");
}在我第二张网页上,有一个girdview控件,我如何实现将数据在此处显示呢?希望能大家给出宝贵的建议,方法,谢谢~还有,session可以这样使用么?
for(int i = 0; i<iRowCount; i++)
{
session["stuId"+i] = Convert.ToString(myDs.Tables[0].Rows[i]["stuid"]);
}
if(myDs != null)
{
session["myDs1"] = myDs; Response.Redirect("~/wangye2.aspx");
}在我第二张网页上,有一个girdview控件,我如何实现将数据在此处显示呢?希望能大家给出宝贵的建议,方法,谢谢~还有,session可以这样使用么?
for(int i = 0; i<iRowCount; i++)
{
session["stuId"+i] = Convert.ToString(myDs.Tables[0].Rows[i]["stuid"]);
}
<asp:SqlDataSource
id="SqlDataSource1"
runat="server"
DataSourceMode="DataReader"
ConnectionString="<%$ connectionStrings:computerConnectionString %>"
SelectCommand="select * from experimentplan2 where 课程编码=@classcode order by 实验编号 ASC">
<SelectParameters>
<asp:SessionParameter Name="classcode" SessionField="classcode" />
</SelectParameters>
</asp:SqlDataSource><asp:GridView ID="experm" runat="server" DataSourceID="SqlDataSource1" AutoGenerateColumns="false"