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
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.
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.
Please remember to mark any helpful posts (from anyone) as the answer once your problem is solved, plus you can mark more than one as the answer.
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.
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.
We are trying to better understand customer views on social support experience. Click HERE to participate the survey. Thanks!
Member
22 Points
173 Posts
After postback ValidatorCalloutExtender not working
Mar 22, 2014 01:33 PM|faremax|LINK
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
Contributor
5032 Points
1309 Posts
Re: After postback ValidatorCalloutExtender not working
Mar 22, 2014 04:38 PM|Russriguez|LINK
When you say dynamically populates it, does it just replace the entire Select element or does it add/remove the Select's option elements?
Member
22 Points
173 Posts
Re: After postback ValidatorCalloutExtender not working
Mar 22, 2014 05:59 PM|faremax|LINK
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.
Contributor
5032 Points
1309 Posts
Re: After postback ValidatorCalloutExtender not working
Mar 23, 2014 12:26 PM|Russriguez|LINK
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.
Member
22 Points
173 Posts
Re: After postback ValidatorCalloutExtender not working
Mar 23, 2014 02:27 PM|faremax|LINK
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.
All-Star
15648 Points
2151 Posts
Re: After postback ValidatorCalloutExtender not working
Mar 25, 2014 05:50 AM|Happy Chen - MSFT|LINK
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.