Posts

Showing posts from April, 2014

Asp.Net (Html 5) Button

retracting what i wrote lately, i had postback issues, seemed that the simple sln was the thing: [ ParseChildren ( false )] [ PersistChildren ( true )] public class html5Button : Button {         protected override string TagName         {             get { return "button" ; }         }         protected override HtmlTextWriterTag TagKey         {             get { return HtmlTextWriterTag .Button; }         }                 // Create a new implementation of the Text property which         / / will be ignored by the parent class, giving us the freedom         // to use this property as we please.         public new string Text         {             get { return ViewState[ "NewText" ] as string ; }             set { ViewState[ "NewText" ] = HttpUtility .HtmlDecode( value ); }         }                 protected override void OnPreRender(System. EventAr

phone user control

we developed a nice easy-to-custom UC for phone with prefix: i must say that the MyForm : TextBoxField are custom WebControls that renders like this: <span>     <label>     <input>     <validator>     <validator>     ... <span> so aspx/html is < div id ="IecPhoneField" class ="PhoneField" runat ="server">    < MyForm : TextBoxField ID ="txtFullPhone" Required ="True" CssClass ="PhoneFieldPhone" ValidationType ="Phone" runat ="server" RequiredError ="required" />    < span class ="makaf"> - </ span >    < MyForm : TextBoxField runat ="server" ID ="PhonePrefix" CssClass ="PhoneFieldPrefix" ValidationType ="RegExp" FormatError ="יש למלא קידומת תקנית" RegExp ="^(0[0-9]{1,2})$" Required ="true" MaxLength =