c# - Date validating Textbox server control -


I am trying to create a custom server control which is a valid text box with AJAX asp.net MASKEDEDITEXTENDER When it becomes focused to ensure that a proper date has been recorded.

All I have done so far and I am capable of creating control, but there is no verification that what I am doing wrong here.

  Namespace One_Eva_Control_Library {[ToolboxData ("& lt; {0}: Valid_Date_Textbox runat = Server & gt; & lt; / {0}: Valid_Date_Textbox & gt;")] Public class Valid_Date_Textbox : System.Web.UI.WebControls.TextBox {#region Methods /// & lt; Summary & gt; Creates /// Valuerator /// & lt; / Summary & gt; /// & lt; Ultimate name = "E" & gt; Init eventArg & lt; / Param & gt; Safe Override Zero OnInit (EventArgs e) {base.OnInit (E); MaskedAddedmarketDataDavidator = new maskedEditAct (); MeDateValidator.ID = "Date Accender"; MeDateValidator.mask = "99/99/9999"; MeDateValidator.MessageValidatorTip = True; MeDateValidator.MaskType = Masked EditType.Date; MeDateValidator.UserDateFormat = MaskedEditUserDateFormat Demonthur; MeDateValidator.CultureName = "en-GB"; Maskeddididator meEiditValidtor = new maskeddididitor (); MeEditValidtor.ControlExtender = meDateValidator.ID; MeEditValidtor.ControlToValidate = base.ID; MeEditValidtor.InvalidValueMessage = "Invalid Date"; MeEditValidtor.Display = Validate Display Dynamic; MeEditValidtor.TooltipMessage = "input date in 99/99/9999 format"; MeEditValidtor.InvalidValueMessage = "*"; MeEditValidtor.ValidationGroup = "MKE"; } #endregion}  

You must add them to the control archive. I do not know what you want from the textbox; I think you might need to be a heir to composite control, and override CreateChildControls and create text boxes, and be sure to add them to the extender / validator bus control archive ...


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -