Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Postback causing problem

Postback causing problem

Scheduled Pinned Locked Moved ASP.NET
help
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    greendragons
    wrote on last edited by
    #1

    Hello everyone. I created a page in which user can upload images and delete as well. But the problem is if user uploads an image(fine)..n hits f5 then same image is again uploaded..which means on refreshing the upload event starts. I tried it by putting condition on upload button event !page.postback..but then user is unable to upload @ all..how i fix tis problem.. *thnx*

    H Y 2 Replies Last reply
    0
    • G greendragons

      Hello everyone. I created a page in which user can upload images and delete as well. But the problem is if user uploads an image(fine)..n hits f5 then same image is again uploaded..which means on refreshing the upload event starts. I tried it by putting condition on upload button event !page.postback..but then user is unable to upload @ all..how i fix tis problem.. *thnx*

      H Offline
      H Offline
      Hemant_ec48
      wrote on last edited by
      #2

      After uploading you clear the value of file upload control..... In UI part hope so validation should be there in such a way that it should not allow user to upload file before selecting

      G 1 Reply Last reply
      0
      • H Hemant_ec48

        After uploading you clear the value of file upload control..... In UI part hope so validation should be there in such a way that it should not allow user to upload file before selecting

        G Offline
        G Offline
        greendragons
        wrote on last edited by
        #3

        Ok bt what about..delete controls and sending a message same problem i face there 2..

        1 Reply Last reply
        0
        • G greendragons

          Hello everyone. I created a page in which user can upload images and delete as well. But the problem is if user uploads an image(fine)..n hits f5 then same image is again uploaded..which means on refreshing the upload event starts. I tried it by putting condition on upload button event !page.postback..but then user is unable to upload @ all..how i fix tis problem.. *thnx*

          Y Offline
          Y Offline
          yesu prakash
          wrote on last edited by
          #4

          After each event redirect it to the current page itself. if any message to display, assign the message to a session and display in the page load give.. Response.Redirect(this.Request.Url.ToString(), false);

          G 1 Reply Last reply
          0
          • Y yesu prakash

            After each event redirect it to the current page itself. if any message to display, assign the message to a session and display in the page load give.. Response.Redirect(this.Request.Url.ToString(), false);

            G Offline
            G Offline
            greendragons
            wrote on last edited by
            #5

            Ohh yeah..ur rite..i gt it..it will work..thnx alot!

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups