Last post Mar 02, 2011 07:37 AM by jayagandhan
Mar 09, 2007 08:23 AM|UBGandalf|LINK
I'm trying to accomplish a textbox MaskEditExtender scenario inside a custom control.
I create the control, add it to the toolbox and use it on a sample page. So far so good.
The problem is MaskedEditExtender does not do its job...
Any help appreciated...
Here is my custom control's code :
public class KSTextBox : TextBox
protected override void OnInit(EventArgs e)
protected override void CreateChildControls()
myMask = new MaskedEditExtender();
myMask.TargetControlID = this.UniqueID;
myMask.Mask = "999,999,999,999.99";
myMask.MaskType = MaskedEditType.Number;
protected override void Render(HtmlTextWriter writer)
Mar 09, 2007 03:37 PM|pzolja2|LINK
Since your control is a composite control you must implement INamingContainer. No need to override Render if all you're doing is call the base method [:)]
Have a good one.
Mar 12, 2007 03:11 AM|UBGandalf|LINK
Thanks for the reply but the mask is not doing its job... (beacuse of me but what...?)
How can I make the extender work ?
Mar 12, 2007 08:29 AM|UBGandalf|LINK
After I render the extender problem got solved.
I have placed it in if (!DesignMode) condition...
Mar 02, 2011 04:37 AM|jayagandhan|LINK
I'm also trying the same but maskedit is not working for me can you paste your working code?
Thanks in advance
Mar 02, 2011 07:37 AM|jayagandhan|LINK
yeah its working fine after i render the extender..