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
    "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.

    Scott.Metzger, Oct 19, 2009
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.