473,465 Members | 1,946 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

File Type?

hi guys...

I am just wondering if there's any method to retrieve the File Type in c#?
say like.. in the tradditonal ASP way.. by using FileSystemObject... there's
a property called File.Type and the following will return.. for .asp file..
it returns string "Active Server Pages." in c#???

thanks

pls advise,
Nigil
Jul 21 '05 #1
3 1453
Cor
Hi Nigil,

You can look for System.IO.Path

Cor
I am just wondering if there's any method to retrieve the File Type in c#?
say like.. in the tradditonal ASP way.. by using FileSystemObject... there's a property called File.Type and the following will return.. for .asp file.. it returns string "Active Server Pages." in c#???

Jul 21 '05 #2
hi there...

thanks for your reply.. but I don't see any property or method regarding my
issue...?
if my file extension is ".asp" and if I use FileSystemObject File.Type ...
it returns "Active Server Pages";

take a look it it.. scroll all the way down and look for Type Property
http://msdn.microsoft.com/library/en...asp?frame=true

pls advise,
nigil

"Cor" <no*@non.com> wrote in message
news:Ok**************@TK2MSFTNGP11.phx.gbl...
Hi Nigil,

You can look for System.IO.Path

Cor
I am just wondering if there's any method to retrieve the File Type in c#? say like.. in the tradditonal ASP way.. by using FileSystemObject...

there's
a property called File.Type and the following will return.. for .asp

file..
it returns string "Active Server Pages." in c#???


Jul 21 '05 #3
Cor
Hi Nigil,

The most close I think I come than with your question is using this

http://msdn.microsoft.com/library/de...classtopic.asp

I hope this helps?

Cor

thanks for your reply.. but I don't see any property or method regarding my issue...?
if my file extension is ".asp" and if I use FileSystemObject File.Type ...
it returns "Active Server Pages";

Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: matt | last post by:
I have compiled some code, some written by me, some compiled from various sources online, and basically i've got a very simple flat file photo gallery. An upload form, to upload the photos and give...
5
by: Dave Smithz | last post by:
Hi There, I have a PHP script that sends an email with attachment and works great when provided the path to the file to send. However this file needs to be on the same server as the script. ...
4
by: M P | last post by:
Can you help me find an asp code that will upload a file from my PC to web server? Mark
0
by: Lokkju | last post by:
I am pretty much lost here - I am trying to create a managed c++ wrapper for this dll, so that I can use it from c#/vb.net, however, it does not conform to any standard style of coding I have seen....
15
by: Nathan | last post by:
I have an aspx page with a data grid, some textboxes, and an update button. This page also has one html input element with type=file (not inside the data grid and runat=server). The update...
3
by: Shapper | last post by:
Hello, I created a script to upload a file. To determine the file type I am using userPostedFile.ContentType. For example, for a png image I get "image/png". My questions are: 1. Where can...
11
by: mesut demir | last post by:
Hi All, When I create fields (in files) I need assign a data type like char, varchar, money etc. I have some questions about the data types when you create fields in a file. What is the...
4
by: Jim Michaels | last post by:
after a file upload, $_FILES is not populated but $_POST is. what's going on here? $_POST=C $_POST=C $_POST=C $_POST=C:\\www\\jimm\\images\\bg1.jpg $_FILES= $_FILES= $_FILES=
0
by: rautsmita | last post by:
hello friends , i am using to jdk6 and JAXB2.0, i have geomtry.xsd file i am trying to compile this file using jaxb but i got some error i.e.The particle of the type is not a valid restriction of...
1
by: shyaminf | last post by:
hi everybody! iam facing a problem with the transfer of file using servlet programming. i have a code for uploading a file. but i'm unable to execute it using tomcat5.5 server. kindly help me how to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.