Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use DataSet and DataView in a method
Message
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
How to use DataSet and DataView in a method
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01359035
Message ID:
01359035
Views:
61
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?
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Next
Reply
Map
View

Click here to load this message in the networking platform