Handling Null Database Values Using Data Source Controls

  • Thread starter ForYourConsternation
  • Start date
F

ForYourConsternation

The page on MSDN with the same title as this post seems to imply that
Eval can be replaced with Bind for the same result on a two-way DB
connection, but it generates the error: The name 'Bind' does not exist
in the current context. Am I just missing something obvious?

Here is the relevant code from the MSDN page (my goal is to replace
Eval with Bind):

<EditItemTemplate>
<asp:DropDownList ID="DropDownList2"
runat="server" DataSourceID="SqlDataSource2"
DataTextField="Name"
DataValueField="EmployeeID" SelectedValue='<%#
GetReportsTo(Eval("ReportsTo")) %>' AppendDataBoundItems="True">
<asp:ListItem Selected="True"
Value="0">(none)</asp:ListItem>
</asp:DropDownList>
</EditItemTemplate>


And the link to the page:
http://msdn2.microsoft.com/en-us/library/ms366709(VS.80).aspx

Thanks for any advice...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,905
Latest member
Kristy_Poole

Latest Threads

Top