Click here to Skip to main content
15,894,291 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am getting on obscure error in Site.Master:

Compiler Error Message: CS0426: The type name 'SiteMaster' does not exist in the type 'System.Web.UI.WebControls.FileUpload'

Source Error:        }
Line 173:        
Line 174:        [TemplateContainer(typeof(FileUpload.SiteMaster))]
Line 175:        [TemplateInstanceAttribute(System.Web.UI.TemplateInstance.Single)]
Line 176:        public virtual System.Web.UI.ITemplate Template_HeadContent {

My code does not go to Line 173 where the error is.
Here is my code:
C#
if (FileUpload1.HasFile)
{
   try
   {
      string filename = System.IO.Path.GetFileName(FileUpload1.FileName);
      string path = System.IO.Path.GetFullPath(FileUpload1.FileName);
      string path1 = System.IO.Path.GetDirectoryName(FileUpload1.FileName);
      string path2 = System.IO.Path.GetExtension(FileUpload1.FileName);
      TextBox2.Text = filename;
      TextBox3.Text = path;
      TextBox4.Text = path1;
      TextBox5.Text = path2;
   }
   catch (Exception ex)
   {
      TextBox1.Text = ex.ToString();
   }
}
Posted
Updated 2-Sep-14 3:27am
v2
Comments
Kornfeld Eliyahu Peter 2-Sep-14 9:17am    
It has something to do with your markup (master or content page), so please show us!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900