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. problem using client side validation and Attributes.Add

problem using client side validation and Attributes.Add

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

    hi i am facing problem !!! Background : As i understand , if we use validation controls in .NET we get an autogenerated javascript to validate control. Problem : My problem is when i use control.Attributes.Add("onClick" , "alert('working')"); on some web control which has CausesValidation as true it never works !!!! and more so, i get two Onclick event call code for the same html control , when i check source of update d html (one of them being for validation control !!) , ..pushpi any answers for the problem or may be some well known workaround ! P.S. PATWAL

    A 1 Reply Last reply
    0
    • P pushpi

      hi i am facing problem !!! Background : As i understand , if we use validation controls in .NET we get an autogenerated javascript to validate control. Problem : My problem is when i use control.Attributes.Add("onClick" , "alert('working')"); on some web control which has CausesValidation as true it never works !!!! and more so, i get two Onclick event call code for the same html control , when i check source of update d html (one of them being for validation control !!) , ..pushpi any answers for the problem or may be some well known workaround ! P.S. PATWAL

      A Offline
      A Offline
      Andy Smith
      wrote on last edited by
      #2

      This is a bug that has been fixed in 1.1 There is no _good_ workaround, but you can look at what I do in my ConfirmedButtons controls if you absolutely need to hook the onclick event.

      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