Please give solution for this error

Discussion in 'C#' started by amitjaura, Jul 1, 2011.

  1. #1
    <asp:HyperLinkField Text="Print Pres" DataNavigateUrlFields="PatientID" DataNavigateUrlFormatString="~/Patient/Report/DrugPrescription.aspx?PatientID={0}"
    Visible='<%#Eval("IsDrugPrescribed") %>'>

    give build time error
    Databinding expressions are only supported on objects that have a DataBinding event. System.Web.UI.WebControls.HyperLinkField does not have a DataBinding event.


    Please sort it out
     
    amitjaura, Jul 1, 2011 IP
  2. DmitryS

    DmitryS Active Member

    Messages:
    79
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #2
    Your problem is in <%#Eval("IsDrugPrescribed") %>'>. you might has more than one rows that are coming against IsDrugPrescribed
     
    DmitryS, Jul 6, 2011 IP