help with a ascx control in the edititem template of a datlist

Discussion in 'ASP .Net Building Controls' started by SStory, Sep 9, 2003.

  1. SStory

    SStory Guest

    I have a states.ascx control--simple dropdown of state abbrevs--comes from
    it's own internal array of abbrevs--simple code.

    It works great on the page in a panel but when another instance is placed in
    the EditItemTEmplate of my datalist control it doesn't display anything in
    the list.

    What is the deal?

    Also, I have learned a lot about the datalist for any newbies that are
    having trouble... I have spent time talking to MS about it and have learned
    a few things--although much to learn still.


    SStory, Sep 9, 2003
    1. Advertisements

  2. SStory

    SStory Guest

    I got help from MS.

    Turns out that in the user control the it won't load correctly if you check
    for ispostback.
    So you need another public routine and pass the page into it and access it's
    caches via that variable and call this sub from within your program in the
    ItemCreated event.

    Hope this info helps someone else
    SStory, Sep 10, 2003
    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.