.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

WebImage is case sensitive on extensions (GIF vs gif)

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :ASP.Net
I was messing about with WebImage and found that either webImage or the html <input type="file" ...> is fussy about the case of file extensions.
Specifically, I wrote a little code to let the user browse the PC's files and select an image file to upload then have WebImage save it off to the images directory of my website.
Turns out that when the filename is "myImage.GIF" the result is a null value from WebImage.GetImageFromRequest()
If the filename is changed to "myImage.gif" everything works fine and the file is, indeed, saved.  I haven't tried it with the other extensions, but this could be a possible explanation if others find inconsistent results from WebImage.GetImageFromRequest() 

More Related Resource Links

Case Sensitive Regular Expression

I need help with a regular expression.

I have the following regular expression that validates a UK Post Code.

(GIR 0AA|[A-PR-UWYZ]([0-9]{1,2}|([A-HK-Y][0-9]|[A-HK-Y][0-9]([0-9]|[ABEHMNPRV-Y]))|[0-9][A-HJKS-UW]) [0-9][ABD-HJLNP-UW-Z]{2})

How can I make this case insensitive as currently this only validates correctly if uppercase letters are used in the correct structure and not lower case.

Case sensitive LDAP query


Hi, I am very new to AD and querying it. If you can, how do you specify case sensitivity in the LDAP query?

I have a series of methods that convert a lamda expression into an LDAP query but i don't know the syntax for case-sensitive searching.

The field it is searching is case-insensitive but as it is a base attribute i don't want to modify it.

Any ideas would be appreciated


Visual Case Tool - UML Tutorial

The Class Diagram

The class diagram is core to object-oriented design. It describes the types of objects in the system and the static relationships between them.

Use Case Diagram

The use case diagram shows the functionality of the system from an outside-in viewpoint.

Actors (stick men) are anything outside the system that interacts with the system.



Hello, i need help changing the following code into a switch...case statementUndecided

<script runat="server">
void Page_Load()
    if (Page.IsPostBack)
    public String toSring()
    int intcomputerChoice=1;
       if (Page.IsPostBack)

OneNote 2010: Creating OneNote 2010 Extensions with the OneNote Object Model


Learn how to build applications and plug-ins that interoperate with data from OneNote 2007 and 2010 using the OneNote Object Model library freely available on CodePlex. Andy Gray demonstrates how easy it is to integrate information from OneNote notebooks, sections and pages into smart client and Web apps.

Andy Gray

MSDN Magazine July 2010

Visual Studio OBA Tools: Simplify OBA Development With Interop API Extensions


To introduce you to VSTO Power Tools Office interop API extensions, we'll walk through the development of an application that automates Outlook, Excel, and Word.

Andrew Whitechapel, Phillip Hoff, and Vladimir Morozov

MSDN Magazine December 2008

Editor's Note: In Case You Hadn't Noticed .


Find out what's new for MSDN Magazine, including a print redesign and the introduction of virtual labs on our web site so you can experiment with our code.

Howard Dierking

MSDN Magazine June 2008

Basic Instincts: My Namespace Extensions with My Extensibility


In this month's column, learn how to integrate your own My Namespace extension into the Visual Basic development environment using the My Extensibility feature.

Matthew DeVore

MSDN Magazine April 2008

Cutting Edge: Context-Sensitive Feedback with AJAX


Beyond progress bars: talking to server-side apps with ASP.NET AJAX.

Dino Esposito

MSDN Magazine July 2007

Extreme ASP.NET: Client-Side Web Service Calls with AJAX Extensions


Microsoft AJAX Library and the ASP.NET 2.0 AJAX Extensions provide a number of compelling features ranging from client-side data binding, to DHTML animations and behaviors. Learn all about them here.

Fritz Onion

MSDN Magazine January 2007

Cutting Edge: Context-Sensitive PictureBox Controls


Great ideas are timeless. A long time ago in Microsoft Systems Journal Paul DiLascia demonstrated a neat trick to display context-sensitive tooltips floating over pictures. As the user moved the mouse over the picture, the tooltip control updated its text to reflect the name of the pointed figure.

Dino Esposito

MSDN Magazine July 2006

C++ at Work: Persisting View State Update, Using Managed Extensions in a DLL


This month marks the 11th anniversary of my column and the inauguration of a new title: C++ At Work. We're also adding a new bimonthly column, "Pure C++," by my pal Stan Lippman, one of the great C++ Masters.

Paul DiLascia

MSDN Magazine February 2005

C++ Q&A: Performance Monitoring, Managed Extensions, and Lock Toolbars


In the June 2004 issue of MSDN®Magazine, I described a class called ShowTime that you can use to do simple performance monitoring for your app. ShowTime uses its constructor/destructor to record the start/stop times of its existence so you can instantiate it in a block of code like so: { ShowTime st(_T("Total time is:")); // some lengthy operation } .

Paul DiLascia

MSDN Magazine September 2004

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