ASP.NET, User Control and ViewState lost the correct data into try get into the user control event

Good afternoon, I have an ASP.NET web page and I created a user control that has some properties that I need to always be retrievable.
ViewState was added to keep information, but the drawback now is that when adding the same control on the same asp.net page and from within a function of the control I want to retrieve the value of the property, this will retrieve the last value entered in the ViewState .

appSettings vs applicationSettings. appSettings outdated?

I’ve got some questions about two ways to save settings in the web.config. Appsettings: Look in web.config <appSettings> <add key=”key1″ value=”value1″/> <add key=”key2″ value=”value2″/> </appSettings> Usage in code-behind: ConfigurationManager.AppSettings["key1"]; ApplicationSettings/ Properties (autogenerated by using the ‘properties’-tab in the project) Look in web.config <applicationSettings> <Projectname.Properties.Settings> <setting name=”TestEnvironment” serializeAs=”String”> <value>True</value> </setting> </Projectname.Properties.Settings> </applicationSettings> Usage in code-behind: Properties.Settings.Default.TestEnvironment … Read more