TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Error Provider Window Application in C#.Net
Krishna Rajput Singh
Jul 09
2016
Code
565
0
2
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
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;
}
}
}
}
window application