Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to use DataSet and DataView in a method
Message
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01359035
Message ID:
01359057
Vues:
25
>>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.

Thank you, Naomi. I will try to make them into the properties of the Page class.
"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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform