Hi All,
I have a Custom Control(.ascx) for example Header which is being used in almost all pages in my application.This control displays some informations. But for some spacific requirement few more Data I want to show in that control. but only in some spacific pages.
My problem is how to restrict the same bcoz If i will add any more control in the Custom Control then it will be reflected in all the pages.
I only want to show the new added control inside the Custom Control in some spacific pages only.
Please help me out.
Gnyanendra
Mahesh ChandPosted Jun 28, 2005, 8:08 AM
There are different ways to do this. One of them is, in your view, session, or application state, you can have a flag and set that flag to true on the pages when you want to display additional information and false on pages where you dont want to display additional information (OnPrerender or other event that fires before controls are being rendered). Now your custom control should check this flag and if its true then display the information otherwise not.