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. Refreshing problem....

Refreshing problem....

Scheduled Pinned Locked Moved ASP.NET
help
7 Posts 5 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.
  • N Offline
    N Offline
    Nagraj Naik
    wrote on last edited by
    #1

    Hi friends, I am adding dynamic controls on form on button click....everything working fine....but if I click on button and refresh the page one more control get added. If anybody has any idea please share with me.... Thanks, Nagraj

    V C B P 4 Replies Last reply
    0
    • N Nagraj Naik

      Hi friends, I am adding dynamic controls on form on button click....everything working fine....but if I click on button and refresh the page one more control get added. If anybody has any idea please share with me.... Thanks, Nagraj

      V Offline
      V Offline
      Vasudevan Deepak Kumar
      wrote on last edited by
      #2

      One more control adds because the existing controls are resurrected from ViewState. Did you try XmlHttp based refresh?

      Vasudevan Deepak Kumar Personal Homepage Tech Gossips

      N 1 Reply Last reply
      0
      • V Vasudevan Deepak Kumar

        One more control adds because the existing controls are resurrected from ViewState. Did you try XmlHttp based refresh?

        Vasudevan Deepak Kumar Personal Homepage Tech Gossips

        N Offline
        N Offline
        Nagraj Naik
        wrote on last edited by
        #3

        Hi, I simply press F5 due to which page get refreshed....and one more control get added.

        1 Reply Last reply
        0
        • N Nagraj Naik

          Hi friends, I am adding dynamic controls on form on button click....everything working fine....but if I click on button and refresh the page one more control get added. If anybody has any idea please share with me.... Thanks, Nagraj

          C Offline
          C Offline
          Chetan Ranpariya
          wrote on last edited by
          #4

          Hi, When you refresh your page the last executed event in the aspx page gets executed again. Thats why one more controls is added.

          Thanks and Regards, Chetan Ranpariya

          1 Reply Last reply
          0
          • N Nagraj Naik

            Hi friends, I am adding dynamic controls on form on button click....everything working fine....but if I click on button and refresh the page one more control get added. If anybody has any idea please share with me.... Thanks, Nagraj

            B Offline
            B Offline
            badgrs
            wrote on last edited by
            #5

            Whilst the other two answers are technically correct I thought I'd elaborate: When you click the button it causes a POST request to the server and returns a page. When you refresh the page it re-submits the POST request which contains the event information to perform, causing it to add another control. I'm not sure what you can do about it, why is this a problem anyway?

            1 Reply Last reply
            0
            • N Nagraj Naik

              Hi friends, I am adding dynamic controls on form on button click....everything working fine....but if I click on button and refresh the page one more control get added. If anybody has any idea please share with me.... Thanks, Nagraj

              P Offline
              P Offline
              Paddy Boyd
              wrote on last edited by
              #6

              I'm sorry, i didn't find your problem all that refreshing...

              N 1 Reply Last reply
              0
              • P Paddy Boyd

                I'm sorry, i didn't find your problem all that refreshing...

                N Offline
                N Offline
                Nagraj Naik
                wrote on last edited by
                #7

                Hi , I am adding dynamic controls on form on button click....everything working fine....but if I click on button and refresh the page one more control get added. Thanks. Nagraj

                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