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. validator control modal pop-up

validator control modal pop-up

Scheduled Pinned Locked Moved ASP.NET
question
4 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.
  • E Offline
    E Offline
    eyeseetee
    wrote on last edited by
    #1

    Hi I am using a Modal Popup control which is attached to a button. However I also have a a required field validator control which is attached to a radio list. When the button is clicked and no option is chosen from the radio list the required field validator should fire, but it doesnt. It fired the modal popup and the validator fires in the background. How can I make the validator fire ahead of the modal popup? thanks!

    I 1 Reply Last reply
    0
    • E eyeseetee

      Hi I am using a Modal Popup control which is attached to a button. However I also have a a required field validator control which is attached to a radio list. When the button is clicked and no option is chosen from the radio list the required field validator should fire, but it doesnt. It fired the modal popup and the validator fires in the background. How can I make the validator fire ahead of the modal popup? thanks!

      I Offline
      I Offline
      immu5
      wrote on last edited by
      #2

      In button click event set the TargetControlId of the modalpopupextender to that button. E.g.if (RequiredFieldValidator1.IsValid) { ModalPopupExtender1.TargetControlID = "Button1"; ModalPopupExtender1.Show(); } Make sure that you set the TargetControlId to some dummy id, which is hidden in design. Hope this will helpful to some extent to solve the problem.

      E 1 Reply Last reply
      0
      • I immu5

        In button click event set the TargetControlId of the modalpopupextender to that button. E.g.if (RequiredFieldValidator1.IsValid) { ModalPopupExtender1.TargetControlID = "Button1"; ModalPopupExtender1.Show(); } Make sure that you set the TargetControlId to some dummy id, which is hidden in design. Hope this will helpful to some extent to solve the problem.

        E Offline
        E Offline
        eyeseetee
        wrote on last edited by
        #3

        The problem is I cant seem to reference the controls in the backend code. When I try the above I get the error message 'AtlasControlToolkit.ModalPopupExtender' does not contain a definition for 'TargetControlID' Even though my control works fine in the front end code thanks anyway

        I 1 Reply Last reply
        0
        • E eyeseetee

          The problem is I cant seem to reference the controls in the backend code. When I try the above I get the error message 'AtlasControlToolkit.ModalPopupExtender' does not contain a definition for 'TargetControlID' Even though my control works fine in the front end code thanks anyway

          I Offline
          I Offline
          immu5
          wrote on last edited by
          #4

          You can set the TargetControlId in design with the hidden(dummy) buttonid.

          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