using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Diagnostics;
using System.ComponentModel;
using System.Text;
namespace Error2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
if (textBox1.Text == "krishna")
{
errorProvider1.Clear();
MessageBox.Show("This is Valid Data");
}
else
{
errorProvider1.SetError(textBox1,"please enter correct data");
MessageBox.Show("please enter correct data");
errorProvider1.BlinkStyle = ErrorBlinkStyle.BlinkIfDifferentError;
}
}
}
}How to write codes for errorprovider control.
