Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use DataSet and DataView in a method
Message
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01359035
Message ID:
01359047
Views:
24
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform