Results 1 to 7 of 7

Thread: [RESOLVED] [2005] File Upload & Postback

  1. #1

    Thread Starter
    Hyperactive Member Coool's Avatar
    Join Date
    Feb 2006
    Location
    System.Coool
    Posts
    333

    Resolved [RESOLVED] [2005] File Upload & Postback

    Hi all,

    I m having one strange problem with my page.

    I am using simple Html button of type submit for postback.(I have checked my page doesn't have any javascript error as well as runat="server" tag.)

    My page has one textbox and one file upload control (which is also of html input control of type file)

    My problem is when i insert WRONG file path in fileupload control, page doesn't postback. However, it postback when i insert right file path.

    NOTE THAT THIS ONLY HAPPENS TO SOME PAGES. NOT EVERY ONE HAVING THE SAME FUNCTIONALTY.

    Thanks in advances
    I am using .NET 2010 with Windows 7

  2. #2
    Frenzied Member brin351's Avatar
    Join Date
    Mar 2007
    Location
    Land Down Under
    Posts
    1,293

    Re: [2005] File Upload & Postback

    Are you saying sometimes the button click does not do anything at all or it postsback (form post) but no button click event code is run? How does this happen on more than 1 page but not others and do you have javascript validation that stops postback (your own or like a "required filed validator")?

    If there is validators on the page and more than one button that "causeValidation=true" the upload button click could be causing validation to fail and not postback.

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [2005] File Upload & Postback

    The fact that the page doesn't postback if an incorrect file path is entered is not a problem. It is more likely a by-design feature. No point in submitting something that isn't there after all.

  4. #4

    Thread Starter
    Hyperactive Member Coool's Avatar
    Join Date
    Feb 2006
    Location
    System.Coool
    Posts
    333

    Re: [2005] File Upload & Postback

    Well, I am using pure Javascript to validate control not required field validator.

    And suppose if it's an design problem then what make it not to do post back when only a path is incorrect. Bec'z i don't think page design are intelligent for file path.
    I am using .NET 2010 with Windows 7

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [2005] File Upload & Postback

    A browser is an application like any other application on your machine. It can effectively do anything on your machine, but browsers are generally designed with specific behavior patterns in mind.

    For example, password textboxes always display as asterisks, and in addition, when a page is 'reloaded', the password field entries usually disappear so that they cannot be viewed in source. That's a browser behavior (defined by standards of course, but that's not the point).

    Now the case described above is similar. It isn't the page itself that has the intelligence, it is the software which interprets your markup. HTML itself doesn't do anything, it's a definition set. The browser is what is doing all the work.

  6. #6

    Thread Starter
    Hyperactive Member Coool's Avatar
    Join Date
    Feb 2006
    Location
    System.Coool
    Posts
    333

    Re: [2005] File Upload & Postback

    Sorry for late reply,

    Yes mendhak, i understood. May be bowser itself using some pattern matching. I noticed that if my fileupload path contains min. one slash at any place then it do postback, which i checked using Javascript easily.

    Thanks mendhak. Great work.
    I am using .NET 2010 with Windows 7

  7. #7
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [RESOLVED] [2005] File Upload & Postback

    Let's just pray for the future when, perhaps, standards will be as-one.

Posting Permissions

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



Click Here to Expand Forum to Full Width