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. Disabled textbox's text disappear after refresh

Disabled textbox's text disappear after refresh

Scheduled Pinned Locked Moved ASP.NET
csharphelp
3 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.
  • C Offline
    C Offline
    customise
    wrote on last edited by
    #1

    I have created a web page using C#.net 2005. The web page contain a textbox which is disabled. And the web page contain a button, after clicking the button, there will be a pop-up window containing calender. When the user select the date in calender, the window will be closed and return the selected value back to the textbox which is disabled. The date will appear on the textbox but after refresh the value is missing.....I cannot figure it out... Please kindly help. I deeply appreciated for your help.

    G T 2 Replies Last reply
    0
    • C customise

      I have created a web page using C#.net 2005. The web page contain a textbox which is disabled. And the web page contain a button, after clicking the button, there will be a pop-up window containing calender. When the user select the date in calender, the window will be closed and return the selected value back to the textbox which is disabled. The date will appear on the textbox but after refresh the value is missing.....I cannot figure it out... Please kindly help. I deeply appreciated for your help.

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      When a form field is disabled, it won't be included when the form is posted. If you want the data to be sent to the server, you have to put it in a field that is not disabled. You can for example put it in a hidden field.

      --- single minded; short sighted; long gone;

      1 Reply Last reply
      0
      • C customise

        I have created a web page using C#.net 2005. The web page contain a textbox which is disabled. And the web page contain a button, after clicking the button, there will be a pop-up window containing calender. When the user select the date in calender, the window will be closed and return the selected value back to the textbox which is disabled. The date will appear on the textbox but after refresh the value is missing.....I cannot figure it out... Please kindly help. I deeply appreciated for your help.

        T Offline
        T Offline
        TRK UK
        wrote on last edited by
        #3

        Hi Modify your page 'form' tag like this..

        'submitdisabledcontrols' is new feature in ASP.NET 2.0 Hope this Helps Thanks..

        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