protected void Page_Load(object sender, EventArgs e)
        {
            String
                arrName  = "MyArray",
                arrValue = "\"1\", \"2\", \"text\"";

            ClientScriptManager
                cs = Page.ClientScript;

            cs.RegisterArrayDeclaration(arrName, arrValue);

            TextBox
                tmpTextBox;

            if ((tmpTextBox = PlaceHolderTextBox.FindControl(DynamicTextBoxSignature) as TextBox) != null)
            {
                LabelInfo.Text = "\"" + tmpTextBox.Text + "\" Page_Load IsPostBack=\"" + IsPostBack.ToString().ToLower() + "\"";
            }

            Button
                tmpButton = new Button();

            tmpButton.ID     = DynamicButtonSignature;
            tmpButton.Text   = DynamicButtonSignature;
            tmpButton.Click += new EventHandler(DynamicButton_Click);
            PlaceHolderTextBox.Controls.Add(tmpButton);
        }
示例#2
0
        private void PhTextBox_TextChanged(object sender, EventArgs e)
        {
            PlaceHolderTextBox txt = (PlaceHolderTextBox)sender;

            if (txt.Text.Length >= 5 && txt.Text.All(char.IsDigit))
            {
                txt.Text = Validations.MascaraCpf(txt.Text);
            }
        }
示例#3
0
 public static bool NotContainsNumber(this PlaceHolderTextBox st)
 {
     st.Text = st.Text.Trim();
     foreach (Char c in st.Text)
     {
         if (Char.IsNumber(c))
         {
             return(false);
         }
     }
     return(true);
 }
        protected void ButtonSubmit_Click(object sender, EventArgs e)
        {
            TextBox
                tmpTextBox;

            if ((tmpTextBox = PlaceHolderTextBox.FindControl(DynamicTextBoxSignature) as TextBox) != null)
            {
                tmpTextBox.Text = "BBB";
            }

            LabelInfo.Text += " ButtonSubmit_Click";
        }
示例#5
0
        public static bool onlyNumber(this PlaceHolderTextBox st)
        {
            st.Text = st.Text.Trim();
            int i = 0;

            while (i < st.Text.Length)
            {
                if (!char.IsNumber(st.Text[i]))
                {
                    return(false);
                }
                i++;
            }
            return(true);
        }
        private void SetupPlaceHolder()
        {
            PlaceHolderTextBox placeHolderTextBox = searchInput;

            placeHolderTextBox.SetupPlaceHolder("Search", Color.DarkGray);
        }