Click here to Skip to main content
15,894,720 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
First page list box control as follows
<asp:ListBox ID ="lbllist" runat ="server">

i want to access first page listbox control name in the second page and set visible false.

Second page code as follows

protected void lnkCbndate_click(object sender, EventArgs e)
{
MPE.Show(); (Ppopup)

if (Session["compkgid"] == "PKG0000041")
{
lblval.Text = "RPRSCRB and RFPFF date get schuffled";
ListBox btn = (ListBox)PreviousPage.FindControl("lbllist");
lblval.Text = "RPRSCRB and RFPFF date get schuffled";
if (btn.Items.Count == 0)
{
btn.Visible = false;
}
}
}

i am writing the above code but it is not working.

please help me.

what is the mistake i made.
Posted
Comments
[no name] 3-Aug-15 12:24pm    
How are you accessing the second page here? Are you redirecting from first page to second page with some event fired on first page?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900