only upload *.xls files...

Discussion in 'ASP .Net' started by =?Utf-8?B?c21lbg==?=, Jun 2, 2004.

  1. hiye, how can i make my upload box to only accept *.xls files

    thanks in advance

    smen
    =?Utf-8?B?c21lbg==?=, Jun 2, 2004
    #1
    1. Advertising

  2. There is no great way that is accepted by all browsers.
    Therefore you'll need to double check the file once it's been uploaded and
    reject it then.

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://Steve.Orr.net


    "smen" <> wrote in message
    news:...
    > hiye, how can i make my upload box to only accept *.xls files?
    >
    > thanks in advance.
    >
    >
    > smen
    Steve C. Orr [MVP, MCSD], Jun 2, 2004
    #2
    1. Advertising

  3. so there is no way to make the upload box to only search for *.xls files?
    =?Utf-8?B?c21lbg==?=, Jun 2, 2004
    #3
  4. Hi,
    maybe just to try on the client to check the extension of th file?

    --
    With the best wishes,
    Shaul Feldman
    "smen" <> wrote in message
    news:...
    > hiye, how can i make my upload box to only accept *.xls files?
    >
    > thanks in advance.
    >
    >
    > smen
    Shaul Feldman, Jun 2, 2004
    #4
  5. Use the File Upload control.
    You can use a validation control with it to help ensure the file has the
    correct extension.
    But like I said, you should also double check the PostedFile.ContentType on
    the server side to verify it is the kind of file that you think it is.
    Here's more info:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/aspnet-fileupload.asp

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://Steve.Orr.net


    "smen" <> wrote in message
    news:...
    > so there is no way to make the upload box to only search for *.xls files?
    Steve C. Orr [MVP, MCSD], Jun 2, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?QXNoYQ==?=

    upload only *.xls file...

    =?Utf-8?B?QXNoYQ==?=, Jun 11, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    586
    Kevin Spencer
    Jun 11, 2004
  2. =?Utf-8?B?ZGFuaWVsZS5iYWxkdWNjaQ==?=

    Generating XLS files from ASP

    =?Utf-8?B?ZGFuaWVsZS5iYWxkdWNjaQ==?=, Jul 4, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    7,021
    =?Utf-8?B?bG9uZG9uIGNhbGxpbmc=?=
    Jul 4, 2005
  3. bubberz
    Replies:
    1
    Views:
    522
    Steve C. Orr [MVP, MCSD]
    Aug 6, 2005
  4. =?Utf-8?B?c25pY2tz?=

    How to embed XLS files within PPT in an ASP.NET app

    =?Utf-8?B?c25pY2tz?=, Jan 20, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    4,217
    Steven Cheng[MSFT]
    Jan 23, 2006
  5. Peps
    Replies:
    2
    Views:
    358
    Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
    Jun 4, 2007
Loading...

Share This Page