CustomValidator - style ="display:none"
Hey,har en CustomValidator på en page, hvor ServerValidate eventet kalder "uxBookingLocationRoomValidator_ServerValidate". Valideringen fungerer korrekt. args.IsValid sættes til false. Når jeg debugger kan jeg se, at this.Page.IsValid også bliver sat til dalse.
Problemet er, at hverken CustomValidators eller ValidationSummary bliver vist. What went wrong?
***** CustomValidator *****
<asp:CustomValidator ID="uxBookingLocationRoomValidator" runat="server" ErrorMessage="Der skal vælges et lokale" Style="position: relative;" ToolTip="Der skal vælges et lokale" ControlToValidate="uxBookingLocationRooms" ValidateEmptyText="True" Display="Dynamic" OnServerValidate="uxBookingLocationRoomValidator_ServerValidate" ValidationGroup="Booking">*</asp:CustomValidator>
***** Validation method *****
protected void uxBookingLocationRoomValidator_ServerValidate(object source, ServerValidateEventArgs args)
{
args.IsValid = Number.IsPositiveInt(this.uxBookingLocationRooms.SelectedValue);
}
***** Generated html *****
<span id="ctl00_MainContentPlaceHolder_uxBookingLocationRoomValidator" title="Der skal vælges et lokale" style="color:Red;position:relative;display:none;">*</span>
