ASP.NET:adding controls Dynamicly afther post back with diffrent data
<p>i got a page where the admin can edit some photos i pull from flickr so all the controls are added Dynamiclly.</p>

<p>i have few controls i add to a panel and then add the panel to Form.Controls.
all the data thay are holding come from flickr. </p>

<p>my problem is that, afther a post back the list change and the controls are loading, BUT the Text Box's keep that same data befor the post back even though i get the data from flickr every time.</p>

<p>what wierd for my that if i do this with less textbox every thing work fine.
the list are about 10+ pictures and this numbers can change in the future.</p>

<p>(sorry for the messy code im pretty new to programming)
here is the code:</p>

<pre><code>protected void Page_Load(object sender, EventArgs e)
    {

        if (!Page.IsPostBack)
        {
            RadioButtonList1.AutoPostBack = true;

            selectedSetID = getSelectedSetId(RadioButtonList1.SelectedItem.Text);

            photoSet = new MyPhotoSet(selectedSetID);
            photo = new FlickerImages[photoSet.Count];

            for (int j = 0; j &lt; photo.Length; j++)
            {
                photo[j] = new FlickerImages(photoSet.MediumURLS[j], photoSet.ThumbnailURLS[j],                                 photoSet.Titles[j], photoSet.Descreption[j], photoSet.PhotosID[j]);

                panel = photo[j].GetPanelWithEditControls(j);

                button = new Button();
                button.ID = "sendDataButton" + j;
                button.Text = "send data";
                button.Click += button_Click;

                panel.Controls.Add(button);
                Form.Controls.Add(panel);
            }

        }
        else
        {
                 //here is the post back,
 every thing load fine.
 adding and removing the controls but if the textbox's load in the same place, it hold the same data befor the post back.

            RadioButtonList1.AutoPostBack = true;
            selectedSetID = getSelectedSetId(RadioButtonList1.SelectedItem.Text);

            photoSet = new MyPhotoSet(selectedSetID);
            photo = new FlickerImages[photoSet.Count];

            for (int i = 0; i &lt; photo.Length; i++)
            {
                photo[i] = new FlickerImages(photoSet.MediumURLS[i], photoSet.ThumbnailURLS[i],                                     photoSet.Titles[i], photoSet.Descreption[i], photoSet.PhotosID[i]);

                panel = photo[i].GetPanelWithEditControls(i);

                button = new Button();
                button.ID = "sendDataButton" + i;
                button.Text = "send data";
                button.Click += button_Click;

                panel.Controls.Add(button);
                Form.Controls.Add(panel);
            }

        }
    }
</code></pre>

<p>(sorry for my english)</p>
