|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Disable Validator through Client-Site codeHi,
I'm using a RangeValidator on a text input field to make sure that a date entered in there is in the future. On my form there is also a DropDownList control. I now want to disable the text box's RangeValidator when the user selects a particular item from the drop-down list. Using AutoPostBack on the DropDownList control and using server-side code this would be an easy task. But I want to provide the user with improved website experience and thus I want to disable the RangeValidator depending on the drop-down list selection using client-side JavaScript code. Is this possible? And how can I do this? I'm using .NET 1.0 and 1.1. TIA, Axel Dahmen Hi Axel,
Welcome to the ASP.NET newsgroup. As for the validation control cilentside manipulation question, based on my experience, for ASP.NET 1.X, there is some clentside script based API for manipulating ASP.NET validation controls at clientside. It contains the method for make a certain validation control do validation , or enable/disable a certain validator, or query the current validation status of a validator.... Here is a good msdn article which described the detailed ASP.NET page validation model(serverside and clientside), and the clientside valication API are also introduced: #ASP.NET Validation in Depth http://msdn.microsoft.com/library/en-us/dnaspp/html/aspplusvalid.asp?frame=t rue#aspplusvalid_clientside Hope this helps. Regards, Steven Cheng Microsoft Online Support Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.) That's it!!! Great article!
Thanks! www.sportbootcharter.com Axel Dahmen ---------- Show quoteHide quote "Steven Cheng[MSFT]" <stch***@online.microsoft.com> schrieb im Newsbeitrag http://msdn.microsoft.com/library/en-us/dnaspp/html/aspplusvalid.asp?frame=tnews:#R5VnBwKGHA.3680@TK2MSFTNGXA02.phx.gbl... > Hi Axel, > > Welcome to the ASP.NET newsgroup. > > As for the validation control cilentside manipulation question, based on my > experience, for ASP.NET 1.X, there is some clentside script based API for > manipulating ASP.NET validation controls at clientside. It contains the > method for make a certain validation control do validation , or > enable/disable a certain validator, or query the current validation status > of a validator.... Here is a good msdn article which described the > detailed ASP.NET page validation model(serverside and clientside), and the > clientside valication API are also introduced: > > #ASP.NET Validation in Depth > Show quoteHide quote > rue#aspplusvalid_clientside > > Hope this helps. > > Regards, > > Steven Cheng > Microsoft Online Support > > Get Secure! www.microsoft.com/security > (This posting is provided "AS IS", with no warranties, and confers no > rights.) > > > Thanks for your followup Axel,
Glat that it is of assistance. Good luck!~ Steven Cheng Microsoft Online Support Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.)
TreeView with custom HierarchicalDataSourceControl
Custom Datagrid not displaying Reading / Modifying FormView Child Controls at Runtime Telling weither the control is in design time or on a web page How do I reference or change formview child controls in code? DataGrid event handlers are being lost during re-compile Custom Controls with UI Designer how to mention the date range in the calendar control Calendar control question RegisterOnSubmitStatement appear twice |
|||||||||||||||||||||||