I am having a problem where I am trying to delete my file but I get an exception.
if (result == \"Success\")
{
if (FileUpload.HasFile)
{
t
I have found that this error can occur in DESIGN MODE as opposed to ? execution mode... If you are doing something such as creating a class member which requires access to an .INI or .HTM file (configuration file, help file) you might want to NOT initialize the item in the declaration, but initialize it later in FORM_Load() etc... When you DO initialize... Use a guard IF statement:
/// FORM: BasicApp - Load
private void BasicApp_Load(object sender, EventArgs e)
{
// Setup Main Form Caption with App Name and Config Control Info
if (!DesignMode)
{
m_Globals = new Globals();
Text = TGG.GetApplicationConfigInfo();
}
}
This will keep the MSVS Designer from trying to create an INI or HTM file when you are in design mode.