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)]
publicclasshtml5Button : Button
{
protectedoverridestring TagName
        {
get { return"button"; }
        }

protectedoverrideHtmlTextWriterTag TagKey
        {
get { returnHtmlTextWriterTag.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.
publicnewstring Text
{
get

phone user control

we developed a nice easy-to-custom UC for phone with prefix:

i must say that the MyForm:TextBoxFieldare custom WebControls that renders like this:
<span>
    <label>
    <input>
    <validator>
    <validator>
    ...
<span>

so aspx/html is

<divid="IecPhoneField"class="PhoneField"runat="server">

   <MyForm:TextBoxFieldID="txtFullPhone"Required="True"CssClass="PhoneFieldPhone"ValidationType="Phone"runat="server"RequiredError="required"/>

   <spanclass="makaf">-</span>

   <MyForm:TextBoxFieldrunat="server"ID