Ok, 2 files in question
countries.xml
regiester.aspx.vbCode:<Countries> <country> <value> Default </value> <name> -- Please Select -- </name> </country> <country> <value> AF </value> <name> Afghanistan </name> </country> . . .
What should happen here is that user selects a country, if the lenght of the value for the country is less than 7 (i.e. not default) then a the drop down list is validated as being select and the form carry's onCode:Protected Sub valCountry_ServerValidate(ByVal source As Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) args.IsValid = (ddlCountry.SelectedValue.Length < 7) End Sub
What happens is that if the user selects the default vakue then the validation works,
if the user selects afghanistan then the validation does not work (i.e. say that country has not been selected)
if the user select anything else it works fine (i.e. recognises that a country has been selected)
I tried adding an extra country between default and afghanisatan, but afghanisatan would still not validate....


Reply With Quote
Bookmarks