I have a main panel which is called
linksAndPicturesPanel within this panel, I want to add more panels -> 1 panel for the link and 1 panel for a picture (red and green).
Furthermore, it should be possible to add multiple links and pictures. To add those panels I use this code:
Panel linkPanel = new Panel(); linkPanel.CssClass = "linkList"; linkPanel.Controls.Add(new LiteralControl("blablabla -----")); Panel picturePanel = new Panel(); picturePanel.CssClass = "pictureFromLink"; picturePanel.Controls.Add(new LiteralControl("blablabla22222 -----")); linksAndPicturesPanel.Controls.Add(linkPanel); linksAndPicturesPanel.Controls.Add(picturePanel);
This works fine for one line. After adding multiple lines, the page reloads and all lines exept the last one are gone. Is there a way, to prevent a page reload so that there all added items will be displayed ?