I have a form that has two source tables. One is the main informatin that I get the data from and have standard databinding set up on. The second table is the parent table of the first. I use it to categorize what I'm looking at, I custom bound it as shown:
<aspropDownList id=cmbCategories EnableViewState="True" Width="180px" Runat="server" DataSource="<# categories #>" DataValueField="ID" DataTextField="LibName" AutoPostBack="True"></aspropDownList>
This control is kept in the header of my DataList that is why I have custom bound it, the data list itself is bound to the other table.
The categories table also has a description field. What I want is basically when the person change the drop down list the page refreshes with information from that category - which I have working fine, BUT on the left of the drop down list I want that description shown, this is where I'm having the issue, so I have the following:
<%# DataBinder.Eval(cats, "LibDescription") %>
However that results in the cats does not exist in the namespace blah blah blah.
That's fine, DataBinder wasn't meant to be used that way...or I don't know the correct syntax. Is there another control that exposes the DataSource property that is similiar to a label or a text box? How can I accomplish what I am trying to do?
<aspropDownList id=cmbCategories EnableViewState="True" Width="180px" Runat="server" DataSource="<# categories #>" DataValueField="ID" DataTextField="LibName" AutoPostBack="True"></aspropDownList>
This control is kept in the header of my DataList that is why I have custom bound it, the data list itself is bound to the other table.
The categories table also has a description field. What I want is basically when the person change the drop down list the page refreshes with information from that category - which I have working fine, BUT on the left of the drop down list I want that description shown, this is where I'm having the issue, so I have the following:
<%# DataBinder.Eval(cats, "LibDescription") %>
However that results in the cats does not exist in the namespace blah blah blah.
That's fine, DataBinder wasn't meant to be used that way...or I don't know the correct syntax. Is there another control that exposes the DataSource property that is similiar to a label or a text box? How can I accomplish what I am trying to do?