locked
After postback ValidatorCalloutExtender not working RRS feed

  • Question

  • User-953209254 posted

    I am having an issue with a dropdownlist and ValidatorCalloutExtenders. I have a simple page with a table and 2 dropdownlists on the page. One has autopostback=true and upon postback it dynamically populates 2nd dropdownlist. The validation still works after postback but popup error messages no longer appear. First ddl is poulated on page load (if not ispostback)

    Why can this be happening? Any input is welcome. Thanks

    Saturday, March 22, 2014 1:33 PM

Answers

  • User-933407369 posted

    I think your issue is related to server side validation.. please have look at http://forums.asp.net/t/1661317.aspx

    if it is not helpful for you, could you provide any additional codes or .aspx source related to this issue? It may be a bit easier to resolve if it can be easily reproduced.

    Thank you for your understanding.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, March 25, 2014 5:50 AM

All replies

  • User-812053960 posted

    When you say dynamically populates it, does it just replace the entire Select element or does it add/remove the Select's option elements?

    Saturday, March 22, 2014 4:38 PM
  • User-953209254 posted

    On page load I check if its postback or not and if it's not then I populate ddl1 with values and text from database and at first position I have "Please select" and value of *. Once user changes selection SelectedIndexChanged event fires up and depending on the selected value it populates ddl2 with appropriate values. Here I have to clear items of ddl2 every time because it depends on the selection of ddl1. idk just a regular scenario that probably pops up every day for a lot of deveopers. I am pretty sure that I used it in my current project but I didn't find it yet. But I am sure that this is the first time I am encountering something like this. 

    Let me generally explain whats going on. There is a page where you can view all items, search and so on. On That page I use RadWindow control to open new windows. In this case I click on Add New and it opens a new popoup in a RadWindow wrapper. Not sure if you are familiar with Telerik controls but it's basically window.open() on steroids.  And on that child I have various controls inside an UpdatePanel which I collect and save into a db.

    Yeah I can get away from this problem very fast if I simply don't use the ValidatorCalloutExtender and simply set display="Dynamic" on the validator. I can also write a javascript to do the validation as well but I want to figure out what could be causing this behavior.

    Saturday, March 22, 2014 5:59 PM
  • User-812053960 posted

    I'm not overly familiar with either RadWindow or ValidatorCalloutExtender, however the webiste for ValidatorCalloutExtender mentions this:

    ValidatorCallout Known Issues

    The callouts do not currently display automatically after a server post-back and will only work for custom validators which utilize client-side validation. Even after a post-back the callout will display when the form is re-validated when a postback is attempted again.

    Sounds a lot like the problem you are having.

    Sunday, March 23, 2014 12:26 PM
  • User-953209254 posted

    Well I just changed requiredfieldvalidator to Customvalidator and wrote a client validation script and still the message is not being displayed. Same behavior as before.

    Sunday, March 23, 2014 2:27 PM
  • User-933407369 posted

    I think your issue is related to server side validation.. please have look at http://forums.asp.net/t/1661317.aspx

    if it is not helpful for you, could you provide any additional codes or .aspx source related to this issue? It may be a bit easier to resolve if it can be easily reproduced.

    Thank you for your understanding.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, March 25, 2014 5:50 AM