How can I restrict a textbox to take only one predefined string and throw an message box in else case

In my winform application I have a textbox that should only take a predefined local server address and throws an message box in the else case as soon as the focus changes from that textbox

Answers


See the Validating event. This event will fire when the control should be validated, which by default happens when the control loses focus.


Need Your Help

Rails: Error while uploading CSV file - “Validation failed: Email has already been taken”

csv ruby-on-rails-3.2

My rails app has CSV upload feature. It uploads CSV file of emails and saves it in customer database.

Can't run “Open Browser” with a Firefox (version 20) instance through Robot Framework IDE + Selenium

windows firefox selenium selenium-webdriver robotframework

I'm looking for a way to, making use of RIDE and the Robot Framework, run Firefox (version 20 -- the latest), opening a page of my liking. This used to pose no concern with earlier Firefox versions...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.