I am developing a Visual Web Part. I have attributes the Visual Web Part consumes. When i use these, I have to re-set the value everytime I re-deploy the web part (by hitting F5).
Here is an example:
public static bool ShowCaseType= true;
[FriendlyNameAttribute("Show Case Time When Multiple (Recomended)"),
Category("My Configuration"),
DefaultValue(true),
WebPartStorage(Storage.Shared),
Personalizable(PersonalizationScope.Shared),
WebBrowsable(true)]
public bool _ShowCaseType
{
get
{
return ShowCaseType;
}
set
{
ShowCaseType= value;
}
}
If i set the above to unchecked in the web part, I stop the application and start it once again, and it has been reset.