Click here to Skip to main content
15,905,322 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello,
I want to read .APB extension file.I tried like reading .txt ,.docx. But can't able to get proper content.My extracted value containing special characters.

txt_box.Text = "";
        if (FileUpload1.HasFile)
        {

            string ServerMapPath = Server.MapPath("~//images//" + FileUpload1.FileName);

            FileUpload1.PostedFile.SaveAs(ServerMapPath);
            //string x1=FileUpload1.PostedFile.InputStream.ToString();
            //Response.Write(x1);

            StreamReader sr = new StreamReader(ServerMapPath);

            string file_data;
            string sb = "";
            while ((file_data = sr.ReadLine()) != null)
            {
                //Response.Write(file_data);
                sb = sb + file_data;

            }
            txt_box.Text = sb;
            
            sr.Close();
            File.Delete(ServerMapPath);

        }
        else
        {
            txt_box.Text ="Upload a file then click";
        }
Posted
Comments
ZurdoDev 20-Mar-12 16:18pm    
What type of file is this? It is some sort of binary file.
vino2012 20-Mar-12 16:31pm    
Combined format of data and special character like ?,rectangle,etc
Sergey Alexandrovich Kryukov 20-Mar-12 17:03pm    
You are just trying in a blindfolded way instead of learning about the type. It usually does not work. The mere fact you have some files of these type and trying to work with it says that you should have some information.
--SA
[no name] 20-Mar-12 21:52pm    
It would easier and quicker if you asked the maker of the software that produced this file for the format.
vino2012 21-Mar-12 8:53am    
.APB means (Alphacam Punch VB Macro) ,can anybody crossed this...

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