I am trying to pass data from one page to another using asp.net
I wrote this code in the second page
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;
}
}
}
}
but it does not work :(
Please help me to find the error :)