M
Mary Kerrigan
I have a user control (menu) with a data list:
<aspataList id="MyList" runat="server">
<ItemTemplate>
<asp:hyperlink
cssclass="MenuUnselected"
id="myLink1"
Text='<%# Container.DataItem("Subject") %>'
NavigateUrl='<%# "../productlist.aspx?SubjectID=" &
Container.DataItem("SubjectID") & "&selection=" & Container.ItemIndex
%>'
runat="server" />
</ItemTemplate>
<SelectedItemTemplate>
<asp:hyperlink
cssclass="MenuSelected"
id="myLink2"
Text='<%# Container.DataItem("Subject") %>'
NavigateUrl='<%# "../productlist.aspx?SubjectID=" &
Container.DataItem("SubjectID") & "&selection=" & Container.ItemIndex
%>'
runat="server" />
</SelectedItemTemplate>
</aspataList>
I want to take the value of the Text attribute (the data item:
"Subject") from the selected item and put it in a label on the parent
page. I have spent a day and a half trying this, so I decided to ask
if anyone out there can help me. Thanks!
<aspataList id="MyList" runat="server">
<ItemTemplate>
<asp:hyperlink
cssclass="MenuUnselected"
id="myLink1"
Text='<%# Container.DataItem("Subject") %>'
NavigateUrl='<%# "../productlist.aspx?SubjectID=" &
Container.DataItem("SubjectID") & "&selection=" & Container.ItemIndex
%>'
runat="server" />
</ItemTemplate>
<SelectedItemTemplate>
<asp:hyperlink
cssclass="MenuSelected"
id="myLink2"
Text='<%# Container.DataItem("Subject") %>'
NavigateUrl='<%# "../productlist.aspx?SubjectID=" &
Container.DataItem("SubjectID") & "&selection=" & Container.ItemIndex
%>'
runat="server" />
</SelectedItemTemplate>
</aspataList>
I want to take the value of the Text attribute (the data item:
"Subject") from the selected item and put it in a label on the parent
page. I have spent a day and a half trying this, so I decided to ask
if anyone out there can help me. Thanks!