Tuesday, 11 March 2014

Control Leave and Enter Event

Set Control Leave and Enter event while Control Focus and Leave



       public void c_Leave(object sender, EventArgs e)
        {
            ((Control)sender).BackColor = Color.White;
        }

        public void c_Enter(object sender, EventArgs e)
        {
            ((Control)sender).BackColor = Color.FromArgb(255, 250, 207);
        }




       private void dtBirthdate_Enter(object sender, EventArgs e)
        {
            c_Enter(sender, e);
        }


        private void cmbCast_Leave(object sender, EventArgs e)
        {
            c_Leave(sender, e);
        }



Error Provider

 if (textBox1.Text == "")
            {
                errorProvider1.SetError(textBox1, "Please Enter Value");
                textBox1.Focus();
            }

Numeric Texbox

Allow Only Numeric Value in Texbox Using Bellow Code On Keypress Event

 private void textBox2_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar >= '0' && e.KeyChar <= '9') return;
            if (e.KeyChar == '+' || e.KeyChar == '-') return;
            if ((e.KeyChar == (char)Keys.Back)) return;
            e.Handled = true;
        }



AngularJs6 using with Asp.net Core Web API 2

AngularJs6 using with Asp.net Core Web API 2 Steps 1) Create project using with command 2) Create services 3) Create routing 4) Modif...