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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Problem reading a textbox in a web control

Problem reading a textbox in a web control

Scheduled Pinned Locked Moved ASP.NET
javascripthelp
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
    asifmaniar
    wrote on last edited by
    #1

    Hi, I am writing a custom webcontrol. I added an asp text box to the control and the javascript populates in with the date. The problem is that on postback when i try to read the text property of the text box via a property in the control it always returns a blank. Any idea why am loosing the viewstate value. The viewstate of the text box is set to true. I assume i dont have to implement the IPostBackDataHandler coz the textbox am using is an asp control. Thanks Asif

    M 1 Reply Last reply
    0
    • A asifmaniar

      Hi, I am writing a custom webcontrol. I added an asp text box to the control and the javascript populates in with the date. The problem is that on postback when i try to read the text property of the text box via a property in the control it always returns a blank. Any idea why am loosing the viewstate value. The viewstate of the text box is set to true. I assume i dont have to implement the IPostBackDataHandler coz the textbox am using is an asp control. Thanks Asif

      M Offline
      M Offline
      minhpc_bk
      wrote on last edited by
      #2

      Hi there, How do you add the standard textbox to the custom control? When do you access the control's property on postback to get the value of the textbox? Are you sure that the textbox is added to the control on postback before you access its value? Perhaps, code snippets could help.

      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