>Hi,
>
>This is a follow up to my message about filtering data view based on user selection (thanks to Bonnie Berent for the suggestion).
>
>1. I have two drop down lists on the page: Drop Down list of Sites and Drop Down list of Buildings. The datasets and dataview for these drop down lists are created in the Page_Load method of the page.
>2. I enabled call to method ChangeBuildingList when Site drop down changes selection (e.g.OnSelectedIndexChanged="ChangeBuildingList")
>3. In the method ChangeBuildingList (code behind) I need to set a filter to the Building drop down list view. But the problem is that Building dataset and dataview "do not exist in the current context" of the method ChangeBuildingList code.
>
>How do I make the building dataset to be in scope (sorry if this is not the right terminology) in a method of the page?
Can you make them to be properties of the Page class? If this idea would not work, you would have to save them either in session or in ViewState.
If it's not broken, fix it until it is.
My Blog