Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New Coder
    Join Date
    Jan 2005
    Posts
    74
    Thanks
    0
    Thanked 1 Time in 1 Post

    Question FileField Properties & Saving

    I had a question regarding setting limitations and properties on he FileField HTML input. I want to limit the browser to certain file types [property File of Types not All Files (*.*)].

    Current HTML Code:
    <INPUT id="fileUpdate" type="file" runat="server">


    At the same time, how do you save the file selected to a specific folder on the server pc (using the same file name)? Is there an EVENT I can hook the SAVE AS to?

    [ASP.NET v1.1]
    Thanks,

  • #2
    New Coder
    Join Date
    Jan 2005
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    For the first question, something like this:

    "accept can be used when type is set to file to specify which file-types should be accepted. This is a comma-separated list of MIME types."

  • #3
    New Coder
    Join Date
    Jan 2005
    Posts
    74
    Thanks
    0
    Thanked 1 Time in 1 Post
    Not sure what you mean, in the HTML section after Type add a list of extensions? Can you please provide an example. Thanks,

  • #4
    New Coder
    Join Date
    Jan 2005
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have this info form a html reference, I don't use it myself. But I should try:
    Code:
    <input type="file" accept="doc,jpg,gif"

  • #5
    New Coder
    Join Date
    Jan 2005
    Posts
    74
    Thanks
    0
    Thanked 1 Time in 1 Post
    Is it possible we are using different ASP or HTML versions? Because I do not have the "accept" method when loading the HTML tags. If I put it it still runs but doesn't work (still all file types *.*).

  • #6
    Regular Coder
    Join Date
    Aug 2004
    Location
    codegoboom@yahoo.com
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Internet Explorer

    MSDN:
    Remarks

    The information from the list can be used to filter out nonconforming files when prompting a user to select files to be sent to the server using the <INPUT> element with type="file".

    Examples of content types include "text/html", "image/png", "image/gif", "video/mpeg", "audio/basic", "text/tcl", "text/javascript", and "text/vbscript".

    There is no functionality implemented for this property unless defined by the author.
    *this message will self destruct in n-seconds*

  • #7
    New to the CF scene
    Join Date
    Mar 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile

    wrath: XHTML is now what you should try to use...basically it will ensure compatibility across all platforms that view html...

    it's really mostly about closing all tags <p>text</p> for example

  • #8
    New to the CF scene
    Join Date
    Jan 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It is vitally important, no matter what medium we are talking about these days - whether Mobile or web, to use good css and html markup. It's pretty much the only way you should be doing things.

    CSS Web Design Gallery

    Check out my own site which lists valid css and xhtml websites from around the web and then take a look at the 'Source' and you'll see how style and content are completely seperate on all of them!

    Once you get in to the swing of it, you'll soon see how easy CSS as a language is to learn because it uses a very simple syntax. When you use it enough, you'll soon see that you will copy a lot across to what ever project you're working on and then edit it to fit. Also, once you've made a few mistakes and learnt the solutions, you'll never forget....like riding a bike really!
    Last edited by oracleguy; 01-17-2010 at 09:56 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •