DataList with Detail Datasource in Footer gives exception

Discussion in 'ASP .Net Web Controls' started by Scott.Metzger, Oct 19, 2009.

  1. Hi,

    I have a DataList and I am using the Footer for the Insert.
    In the Footer I have a Detail View DropDownList which uses another
    DropDownList in the Footer as the Master.
    Therefore the SqlDataSource for the Detail must be in the Footer so the
    Master is visible for the parameter.

    Once I click the Insert and the control goes back to the Item Template (with
    the footer.visible set to false) the datasource is rebound and I get an
    exception
    "sqlDatasource does not have a naming container. Ensure that the control is
    added to the page before calling DataBind"

    How can I 'abort' the DataBind if there is no naming container? I don't
    really need the datasource to be bound at this point since I am not viewing
    the Footer.

    Thanks,
    Scott
     
    Scott.Metzger, Oct 19, 2009
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nevyn Twyll
    Replies:
    8
    Views:
    1,881
  2. vips
    Replies:
    7
    Views:
    6,301
    pushpakladdha
    May 11, 2006
  3. Arun Kumar Menon

    Master Detail detail

    Arun Kumar Menon, Aug 6, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    204
    Arun Kumar Menon
    Aug 6, 2003
  4. Frederik Borg

    ASp.net data binding: Master-detail-detail

    Frederik Borg, Jun 9, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    362
    Frederik Borg
    Jun 9, 2006
  5. Henrik
    Replies:
    1
    Views:
    428
    Ken Cox [Microsoft MVP]
    Jul 6, 2006
Loading...

Share This Page