.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

file extension

Posted By:      Posted Date: October 08, 2010    Points: 0   Category :.NET Framework

how do u check the file extension in an upload control post


View Complete Post

More Related Resource Links

What registry keys are responsible for file extension association?

I'm trying to associate file extension to start some type of files with my application. Which registry keys I have to modify to be sure, that when user double click at file it opens with my application. And how get delete/modify permisions to key "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\<extension>\UserChoice"? This key created after setting default program by "Open with" dialog. I've tried: string ext=".eee"; RegistryKey r = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\"+ext); RegistryPermission f = new RegistryPermission(RegistryPermissionAccess.Write, r.Name); f.Assert(); r.OpenSubKey("UserChoice", true); //at this step "Requested registry access is not allowed." exception occured

How to show link file extension (lnk) in Explorer

My folders normally shows the file name extension.  But I have a folder full of window links and DOS links. I'm sure that is not the correct termioligy but it is the best I can do. I think I'm talking about .lnk and maybe .pif files. Anyway, the extension do not show in the folder listings. Can I make them show?   Thanks  

url rewrite for images(.jpg file extension not .aspx)



I have stored DB images. and I try to access images using url rewrite. But it is not happaning.

I tried this scott methord. http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx. i tried with Application_BeginRequest, but no use

Basically Client don't want to use .aspx extension for images

Is it possible acess db images with out using .aspx file name extension?  then can anybody tell me how to achieve this!!!!!!!!!!!!

My sample url is "www.sample.com/images/folder/imagefilename.jpg" I want to rewrite to "www.sample.com/images/pimges/default.aspx?file=imagefilename.jpg&cat=folder"



how to convert file with .tvr extension to notepad then read the file



            My text file consist of following data.In the below file i have to read dates( for example 9/13/2010 and corresponding Time 1300-2100) and empname Abbott,Luis insert into databse. similraly remaining dates.I have to ignore first 15 lines





-------------------- ----------- ----------- ----------- ----------- ----------- ----------- ----------- -------------
 Monday Tuesday Wednesday Thursday Friday Saturday Sunday 
 9/13/2010 9/14/2010 

couldn't open a file extension .cert from browser


 There is a file with an extension .cert sitting on web server. when i tried to access it through URL, i couldn't open it and didn't give any error message also. I verified the file existence in that folder and also i could open it using notepad. Is there any MIME to be added to open this file?

How can I get a list of applications registered for a certain file extension in a WPF application?

I'm looking for a Win32 or Shell function that can be called from a WPF application to get a list of registered applications in Windows for a specific file extension. For instance if I would pass ".rtf" to the function it should return something like "Microsoft Office Word|C:\Program Files\Office\Winword.exe|Wordpad, C:\Program Files\Windows NT\Accessories\wordpad.exe". I need this to construct a 'Open with' context menu somewhat related to the file context menu in Windows Explorer. In Windows Forms I could get the the Windows Explorer context menu with IContextMenu, IShellFolder etc. But this approach requires a WndProc because the context menu data will be send with WM_ messages. But for WPF this is not an acceptable solution because there is no WndProc. I know that I can get that data from the registry HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\OpenWithList but I will not use it because in a future Windows release the registry structure may change and this would break my application. I also don't want to mess around in Windows internal data. And there is no list to get anyway. All I found in the registries .png\OpenWithList key was a DllHost.exe and mspaint.exe. But DllHost.exe is no application to open a .png file. And the mspaint.exe doesn't specify a path. The display names are also missing.

file extension problem


I try to upload  .mdb file to wss 3.0 and get an error message. When I go to Central  Administration - Operations - Blocked files type, I can delete the extension from the list, but I cannot click ok - the change doesn't stay.  Please, help



The filtering process could not be initialized. Verify that the file extension is a known type and i


I have medium farm in sharepoint 2007 and sql 2005.

I see errors in the crawl log due to file extension is not known for PPTX .

Where can I add file extension? What is the best way to handle this error?



Directory listing without showing file extension?



I've seen various tutorials and scripts online which show how to create a directory tree which list the file name, size etc.

My question is, I need a script that is basically a normal directory listing but it doesn't show the file extension.  If anyone can even point me in the right direction it'd be of much help!



any way of adding extension after unzipping a file in asp.net



i generated a zip file of xml file,,ie aa.xml.zip....but after downloading that file,i extracted the zip file,then i cant getting in the correct format of xml file with extension .xml...how will possible this...anyone help me to solved out this problem..TIA.........

The Decorator Pattern & Extension Methods

The decorator pattern provides a formal way to add new functionality to an existing type, without sub-classing. First question: What is wrong with classical inheritance? In and of itself, nothing is wrong with the good old Is-A relationship. It is very common to derive a new class from an existing base class in order to override a few virtual members, and add a pinch of new functionality.

File Splitter in .Net

I love to do utility programs in .Net. And this is one of them. As I was playing with JSplit (a free file splitter program), I wondered if I could do it in .Net. The framework supports file operations like reading files in bytes and creating them. It is indeed easy to do file operations in .Net Basics on File operations

Upload Multiple File using JQuery in asp.net

In this article I have explained how to upload multiple files using file upload control. I have used jQuery plugin for uploading multiple files.

I have also explained how to check for file type, file maximum size limit using jQuery & also using server side validation code.

Creating Excel file from C#

I used below coding for create a excel sheet.I got from on web site.
In below coding there is no problem.Its create the excel file.If i run second time,its ask to overwrite the current excel file.If I said "Yes" then it ok ,but If I select cancel button,its generate the Error message.The exception is

The Decorator Pattern & Extension Methods

Numerous design patterns exist in the software world today, and ultimately nothing is preventing you from making your own (if people buy into it or not is another question). Furthermore, there is no 'master list' of patterns that all developers agree upon. While this is true, if you pick up any book on the subject, you will find a set of very common patterns most programmers agree are very useful. Many of these patterns were first formalized in the seminal book on the subject, Design Patterns: Elements of Reusable Object-Oriented Software (aka, the Gang of Four [GOF] book; not to be confused with the UK punk band of the same name).

Upload a File to a SharePoint Document Library - Part I

The following helper class demonstrates a few techniques that allow documents to be uploaded to a SharePoint document library programmatically without using the API or a custom web service. You don't need to specify a document library name, and it will create any folders specified in the URL as required. File meta data will be updated if any properties are passed.

SmtpClient and Locked File Attachments

Got a note a couple of days ago from a client using one of my generic routines that wraps SmtpClient. Apparently whenever a file has been attached to a message and emailed with SmtpClient the file remains locked after the message has been sent. Oddly this particular issue hasn't cropped up before for me although these routines are in use in a number of applications I've built.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend