Let me elaborate with and example,
ProducuListing.aspx and ProductDetails.aspx are two pages in my website. I want to do something like
IPageState pd = new ProductDetails() as IPageState;
pd.ClearState();
in the ProductListing.aspx page and vice versa. Now I cannot hard code the page class names like in the above example. So the obvious solution which I would use is reflection. But then the assemblies for each page is different as I am using the vs 2005 website project.
I want a generic solution wherein I can create an instance of any page in the website and check if it implements that interface and if it does call the ClearState method on it.
I hope this makes my question more clear.
Counting on you folks!!!!