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. RequiredfieldValidator

RequiredfieldValidator

Scheduled Pinned Locked Moved ASP.NET
help
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.
  • S Offline
    S Offline
    smruti_ranjan
    wrote on last edited by
    #1

    hi i want to validate a Textbox which is in a webpartZone, i am able to do that when my aspx page is not inheriting from master page, but when I am using a aspx page with master page and my Textbox in side a webpartZone I am not able to valdate the text box .it through an error Unable to find control id 'TextBox1' referenced by the 'ControlToValidate' property of 'RequiredFieldValidator1' please give some . Regards Smruti Smruti

    M 1 Reply Last reply
    0
    • S smruti_ranjan

      hi i want to validate a Textbox which is in a webpartZone, i am able to do that when my aspx page is not inheriting from master page, but when I am using a aspx page with master page and my Textbox in side a webpartZone I am not able to valdate the text box .it through an error Unable to find control id 'TextBox1' referenced by the 'ControlToValidate' property of 'RequiredFieldValidator1' please give some . Regards Smruti Smruti

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

      Hello. Do you have another "TextBox1" somewhere on your page? Perhaps in the Master page itself? If so - ASP.NET renames the controls in order to get a unique ID. It should automatically rename your RequiredFieldValidator1 reference to the control as well. But perhaps this does not happen as expected. Anyway you should go check it out. I've found the best way to debug this, is to try and rename your control to something logic eg. "txtName" - that way you ensure, that you decide the names, and not Visual Studio, because, well, it's best the other way around. ;-) Best Regards Soeren

      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