M
Miro
I am having a hard time understanding "Labels" within asp.net and
databinding.
I have a very simple xml file and I dropped an XMLDatasource onto the aspx
page.
Each "Node" has 3 dataparts...
<types>
<type id="1" desc="hello" age="12" />
<type id="2" desc="goodbye" age="33" />
</types>
I linked a combo box to the XMLDatasource
(Combo box displays all the proper available "Descriptions".
All works well... I have the value = id and the list is displaying the desc
Now, on the DropDownList1_SelectedIndexChanged i want to put code to update
a label on the aspx page with the 'Age' of the current id on the selected
item in the drop down list.
Here I am stumped.
I think I am a lot closer... I have a formview with an Item Template with a
label bound to the "Age" column.
But how do i change the Formview to be the record ID hit within the dropdown
list.
The dropdown list is "Outside" of the FormView so somehow I need to either
"Seek" the proper xmlDatarecord and make the formview link to that,
or get rid of the formview and just add Labels...and when I seek the record
( somehow ) on the dropdown list, I can just say
lblAge.text = bla
I do not know how to "seek" the xmldatafile as a datarow so I can extract my
columns or something.
Thanks,
Miro
databinding.
I have a very simple xml file and I dropped an XMLDatasource onto the aspx
page.
Each "Node" has 3 dataparts...
<types>
<type id="1" desc="hello" age="12" />
<type id="2" desc="goodbye" age="33" />
</types>
I linked a combo box to the XMLDatasource
(Combo box displays all the proper available "Descriptions".
All works well... I have the value = id and the list is displaying the desc
Now, on the DropDownList1_SelectedIndexChanged i want to put code to update
a label on the aspx page with the 'Age' of the current id on the selected
item in the drop down list.
Here I am stumped.
I think I am a lot closer... I have a formview with an Item Template with a
label bound to the "Age" column.
But how do i change the Formview to be the record ID hit within the dropdown
list.
The dropdown list is "Outside" of the FormView so somehow I need to either
"Seek" the proper xmlDatarecord and make the formview link to that,
or get rid of the formview and just add Labels...and when I seek the record
( somehow ) on the dropdown list, I can just say
lblAge.text = bla
I do not know how to "seek" the xmldatafile as a datarow so I can extract my
columns or something.
Thanks,
Miro