Well, a FormView displays a single record from a Data source. In this
case, it displays the first record of your datasource. It is quite
obvious that you must tell the FormView *which* record to display. In
this case, it appears that you are missing a ControlParameter or
QueryStringParameter (in the SelectParameters collection) which would
help to filter the data from the datasource to the record you want to
display.
On Nov 1, 12:00 am, BigJ <[EMAIL PROTECTED]> wrote:
> I created a table that has delete and details links. When you click
> the details link, a div is displayed with the deatails of each
> record. The code reads as follows:
>
> <div id="divEdit" class="popupWindow" Runat="server">
> <asp:FormView
> DataKeyNames="EmployeeId"
> id="frmEdit"
> DataSourceId="salaryBenefitsSrc"
> runat="server">
> <ItemTemplate>
> <div><B>Name: </b><%# Eval("Full Name") %></div>
> <div><B>Title: </b><%# Eval("Title") %></div>
> <div><B>Salary: </b><%# Eval("Salary") %></div>
> <div><B>Health Care: </b><%# Eval("Health Care") %></div>
> </ItemTemplate>
> </asp:FormView>
> <asp:LinkButton
> id="lnkClose"
> Text="Close"
> OnClick="lnkClose_Click"
> Runat="server"/>|
> <asp:LinkButton
> id="lnkEdit"
> Text="Edit"
> CommandName=""
> Runat="server"/>
> </div>
>
> The code works fine w/1 exception, in displays the details of the
> first record for all of the records. What property do I need to set
> so that the data values will correspond to the correct record? Thanks
>
> Jon