File upload problem
-
Hi, I'am using ASP.NET 2 and I am trying to check size of an upload file.Since by default fileuploader can upload upto 4Mb if i try to upload a file greater than 4Mb shows a page that shows PAGE CANNOT BE DISPLAYED message without entering the upload function.How can i reload my default page without showing this error page if size is greatrer than 4Mb.i dont want to increase my upload size though..
Prasobh
-
Hi, I'am using ASP.NET 2 and I am trying to check size of an upload file.Since by default fileuploader can upload upto 4Mb if i try to upload a file greater than 4Mb shows a page that shows PAGE CANNOT BE DISPLAYED message without entering the upload function.How can i reload my default page without showing this error page if size is greatrer than 4Mb.i dont want to increase my upload size though..
Prasobh
-
Hi, I'am using ASP.NET 2 and I am trying to check size of an upload file.Since by default fileuploader can upload upto 4Mb if i try to upload a file greater than 4Mb shows a page that shows PAGE CANNOT BE DISPLAYED message without entering the upload function.How can i reload my default page without showing this error page if size is greatrer than 4Mb.i dont want to increase my upload size though..
Prasobh
Hello, Check the file length first. You may helped by the following code. (Refrence : using System.IO;) FileInfo FI = new FileInfo(@"C:\Rate.txt"); Response.Write("File Size : " + FI.Length.ToString()); This code returns the size of the particular file. You may check the file size u want. Reply. Best Of Luck. :-O
Dipak
-
Hello, Check the file length first. You may helped by the following code. (Refrence : using System.IO;) FileInfo FI = new FileInfo(@"C:\Rate.txt"); Response.Write("File Size : " + FI.Length.ToString()); This code returns the size of the particular file. You may check the file size u want. Reply. Best Of Luck. :-O
Dipak
Hi, but my function upload is not calling when i try to upload a file greater than 4Mb.didnt even go to page_load just go to PAGE CANNOT BE SHOWn message.. i dont want to increase the file size also... i need to reload my default page if some one try to upload a large file.. can i check file size at server side before actually begin to upload
Prasobh
-
Hi, I'am using ASP.NET 2 and I am trying to check size of an upload file.Since by default fileuploader can upload upto 4Mb if i try to upload a file greater than 4Mb shows a page that shows PAGE CANNOT BE DISPLAYED message without entering the upload function.How can i reload my default page without showing this error page if size is greatrer than 4Mb.i dont want to increase my upload size though..
Prasobh
Hi dear, For making upload more than 4MB you just need to alter ur webconfig file, becoz by default webconfig settings allows for 4MB data transmit. u can find the Code line for same thru google.
Hello Forum Always be in touch to help about the topic ASP.NET