asp.netを使用して、あるページから別のページにデータを渡そうとしています
このコードを2ページ目に書きました
protected void Page_Load(object sender, EventArgs e)
{
Div1.InnerHtml = "I am here";
if (Page.PreviousPage != null)
{
CheckBoxList CheckBoxList1 =
(CheckBoxList)PreviousPage.FindControl("CheckBoxList1");
string section = "";
foreach (ListItem sec in CheckBoxList1.Items)
{
if (sec.Selected)
{
section += sec.Text + "<br />";
this.d.InnerHtml = section;
}
}
}
}
しかし、それは機能しません:(
エラーを見つけるのを手伝ってください:)