Click here to Skip to main content
15,890,336 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi i have developed treeview which shows categories and it's subcategories using asp.net.

everything works fine.

but the issue is,

consider master page form and child page form.

for example,

consider this as masterpage.aspx ,default aspx ro home.aspx and sports.aspx.

i am binding treeview in master page. so when i run the prgram. home will sart as i mentioned home.aspx as start up page. till now everthing works good. when i redirect to sports.aspx page, sports.aspx page will show. but that time treeview is empty.

becuase though we redirect to any other child page. the command prompt will come back to master page and pages display on ther screen. right? this is normal thing.

so, if i redirect page to sporst.aspx page, it does all work of aspx page and come back to maseter page. that time again i am binding treeview.

let me tell in clear way.

in master page,

if (xxxxx)
{
treeview binding // before redirect page. it forms treeview. so after redirect page. treeview is empty.

}
so,
else
{
treeview binding (again)
}

so, i am binding two time ( working the same work twice). so, is there any other possiblities to bind one time treeview and i can retrun treeviw. wherever i need treeview is , i will make treeview.visible = true, like other .net control exists like label, textbox (visible true and false).
Posted

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