I am creating an application that creates a list of buttons from video files.
Each button is generated to open the file on click, and then I use an open api (omdb.com) to get the movie posters for each one. However, not only is doing this process each time you launch the application slow, but it is also an unnecessary load on the website.
What is the most efficient way to save a control after it is dynamically generated in the backend.
So far I have tried using Properties.Settings
, but without any luck.
SettingsProperty newSetting = new SettingsProperty("Movie_Button");
newSetting.Name = "Movie_Button_" + *an int that I generate*.ToString();
newSetting.Attributes.Add(Width, 200);
//Carry on setting attributes
So far this process hasn't yielded any results, even when just trying to create a SettingsProperty that's just a simple string. And I have tried with and without Properties.Settings.Default.Save()
.
Is there a way to save a control created at run time so it carries over to the next launch of the application?
If there is no way to do this, then can someone please help me create the new SettingsProperty to hold a string, or possibly an XML that I could use.