CodeVerge.Net Beta


   Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums



Zone: > Asp.Net Forum > asp.net_ajax.asp.net_ajax_ui Tags:
Item Type: Date Entered: 1/8/2008 3:38:45 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
9.00
XPoints: N/A Replies: 1 Views: 4017 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
2 Items, 1 Pages |< << Go >> >|
"universeCode"
NewsGroup User
requiredfieldvalidator + modalpopupextender + postback9/26/2007 9:15:07 AM

2

Hi There, I?m hoping that some-one will be able to assist with the issue that I?m facing.I have a form with a link button, a normal button and 3 textboxes.The text boxes are linked to auto complete extenders and require field validators.The text boxes work in a cascading manner. The first is always shown and once proper data is typed in, the next text box is shown and the same applies for the second to third text box.The other option ? other than typing in the fields is to select and existing set of data from a list:A modal popup extender is associated to a panel and when the link button is clicked, the modal window pops up.On this modal window, I have a radio button list and 2 buttons. One button is linked to the cancelcontrolid property on the modal popup extender. The other button will do cause a postback.When I select the option I?m interested in from the radio button list and then click the submit button, the textboxes are populated and the rows that contain the second and third textboxes are made visible. This works perfectly if I am typing in the details field by field but not if I select something from the list in the modal window. The window pops up fine ? I can select what the item I want but when I submit, the postback is prevented from happening by the validators. Once I take the validators off the form, this process works perfectly as well. Is there a way to prevent the validators from firing if I want a postback to occur? Please help me. I am verrrry new to ASP.NET programming so if I have not made myself clear, please let me know if there is anything else required to assist me. Best regards,Mervyn

 

"dwhite" <>
NewsGroup User
Re: requiredfieldvalidator + modalpopupextender + postback9/26/2007 12:07:36 PM

0

Validators have issues with the UpdatePanel, see http://blogs.visoftinc.com/archive/2007/09/23/asp.net-ajax--updatepanel-not-working--common-problems.aspx tip #4 for some links to more information.

The most import link there is http://www.asp.net/ajax/documentation/live/overview/UpdatePanelOverview.aspx; specifically:

"To make the validators compatible with an UpdatePanel control, set the EnableClientScript property of the validators to false. This disables the client script that would ordinarily be used to perform validation in the browser. As a result, during an asynchronous postback, the validators perform validation on the server. However, because only the content of the UpdatePanel is refreshed, the validators can provide the kind of immediate feedback that is ordinarily provided by client script."

-Damien


** Remember to mark posts as the answer to help future users. **
Visoft, Inc - Web Site | Blogs
2 Items, 1 Pages |< << Go >> >|



Free Download:






   
  Privacy | Contact Us
All Times Are GMT