-1

I have a aspx .net webform and I use a validation summary to display val errors and I have been using a linkbutton to call an onClick method. 1. If the form validates it does the post and life goes on. 2. If validation fails the ValSummary displays the error message fine BUT the linkbutton will NOT postback again. ???????

It is supposed to postback to the same page. If I manually change the PostBackURL attribute to tell it to postback to itself it doesn't work at all. Even for the first postback.

Link b4 click - javascript:__doPostBack('ctl00$cphContent$lnkTest','')

Linkafter click-javascript:WebForm_DoPostBackWithOptions(new%20WebForm_PostBackOptions("ctl00$cphContent$lnkTest",%20"",%20false,%20"",%20"../contact/testval.aspx",%20false,%20true))*

The strange thing is this just cropped up within the last week and the site has been running correctly for a couple years with the linkbutton operating correctly. Essentially the client calls and goes something is working funny!! lol. I can duplicate it in VS but an exception doesn't get thrown. I have the issue on all pages that use the linkbutton with validation. I have recreate the same on a test form page.
If switch out the linkbutton control with a button control it works correctly. But what did I miss that changed???

Thanks

glerler
  • 39
  • 8
  • Further update - after the PostBack it kills all of the other LinkButtons I may have on that page also, not just the Submit! – glerler Feb 11 '14 at 18:25
  • What browser are you using? Did you try with a different browser? – gbs Feb 11 '14 at 19:30
  • The browser doesn't matter. The issue is the same. – glerler Feb 11 '14 at 20:06
  • Are you getting any javascript errors? I vaguely remember LB behaving weird where it was throwing __doPostback missing or something like that. – gbs Feb 11 '14 at 20:37

1 Answers1

0

Any control that Validates will not PostBack until all failed validators are satisfied.

Howard Taylor
  • 23
  • 1
  • 4
  • Thx for the reply. This is not an issue with validating. The situation show up on a production server that has been running w/o issue. The link button controls stopped posting back for an unknown reason. I changed to a button control and everything works correctly. ??? Not really sure what happened. I haven't looked at the issue recently. – glerler Jan 22 '15 at 18:17