RequiredFieldValidator disables LinkButton

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bonaparte
    New Member
    • Jul 2007
    • 1

    RequiredFieldValidator disables LinkButton

    At least someone is reading this, thanks ;-)


    I am working in VWD 2005 Express - ASP.NET 2.0 - FrameWork 2.0 - XP Pro - IE 6.0 all with the latest ServicePacks.

    I have a form with RequiredFieldVa lidator for a TextBox, and a LinkButton.

    The RequiredFieldVa lidator prevents firering the Linkbutton even if LinkButton RequiresValidat ion = False.
    and even if I placed the RequiredFieldVa lidator in Validation-Groeps they still wont let Linkbutton do his job.

    The fieldvalidators dit not fire the error-message at all !? Just gave in the status bar 'error on the page'

    I added a simple test at http://www.yebbee.com/test2.aspx, with 1 RequiredFieldVa lidator next to the textbox.
    The linkbutton does not require validation.

    I wonder why this does not happen in IE7 or in the DebugMode.
    There must be a fix or workaround for this (I hope)

    I search further ...
    or does anyone (you maybe ?) know how to fix this.

    Have a nice day

    Bonaparte
  • TRScheel
    Recognized Expert Contributor
    • Apr 2007
    • 638

    #2
    Assuming I understand your problem,

    A LinkButton forces a postback. If anything on the form requires validation, it will not allow the postback to fire, effectively disabling your link button. You could disable the validation if its not being used, and that would let the LinkButton postback.

    Comment

    Working...