Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Making a dataset available in the designer
Message
 
À
11/10/2003 11:04:12
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00837820
Message ID:
00837823
Vues:
34
Michael, I'm not certain of this, but I think it has to do with the InitializeComponent Sub in the codbehind page. Notice when you drop a dataset on a page the ds is declared at the top of the class WithEvents and instaniated in the InitializeComponent Sub. I haven't tried adding a control like this programmatically, so don't know how that would work. Seems it should. I normally add the dataset to the designer, let it generate its code, then modify it in the codebehind.

Okay, I just tried it and the ds I added programmatically did appear as a datasource, so maybe you should look at that.

HTH,

~dab

>In the Page_Load() event of an ASP.NET page, I am creating a DataSet. Basically, it goes like this:
>
>
>Dim loData As DataSet
>loData = New DataSet
>ImportXML(loData, lcXML)
>
>
>This data will be displayed by the use of the DataList control that I dropped on the WebForm.
>
>The DataSet is bound to the DataList like this:
>
>
>DataList.DataSource = loData
>DataList.DataMember = "Temp"
>DataList.DataBind()
>
>
>This code is also in the Page_Load() event and right under the DataSet generation.
>
>Now, I want to design my DataList with the designer. So, when I right click on the DataList and select Property Builder, there is no choice is the DataList listbox. I understand I have to do something else in order to make the designer recognizes the DataSet that I coded manually. How should I proceed to make it recognized?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform