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. ViewState and Enabled property in a textb

ViewState and Enabled property in a textb

Scheduled Pinned Locked Moved ASP.NET
questioncsharpasp-netdatabase
2 Posts 2 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.
  • A Offline
    A Offline
    allende
    wrote on last edited by
    #1

    HI friends, I have a web form with several controls I'm posting to a database. For two of them(textboxes) I'm looking up the values using a popop window, so the user cannot edit the actual textboxes values, they have to go through the lookup process, which populates the controls. What is happening is that everytime I set the readonly=true or the enabled=false for these textboxes, the ViewState seems to not store their corrent values. In both cases when I do the postback and the page comes back, the control shows up the the previous value, not the one I posted back with the page otherwise it will show the correct value(readonly = false; enabled = true) This is the asp.net code for the textboxes: Any idea on this?

    S 1 Reply Last reply
    0
    • A allende

      HI friends, I have a web form with several controls I'm posting to a database. For two of them(textboxes) I'm looking up the values using a popop window, so the user cannot edit the actual textboxes values, they have to go through the lookup process, which populates the controls. What is happening is that everytime I set the readonly=true or the enabled=false for these textboxes, the ViewState seems to not store their corrent values. In both cases when I do the postback and the page comes back, the control shows up the the previous value, not the one I posted back with the page otherwise it will show the correct value(readonly = false; enabled = true) This is the asp.net code for the textboxes: Any idea on this?

      S Offline
      S Offline
      Sandeep Akhare
      wrote on last edited by
      #2

      I think that's not the issue Issue might is with updating the text box with new value. Debug the application by putting break points and check what is happenig

      Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... " Check My Blog

      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