09/01/2015 by Nitesh

Download Image Files From FTP Server in C#

Friends, In my previous posts, I dealt with How To List Files From FTP Server, How To Delete File From FTP Server. In this post, we will see how can we can download an image file from FTP server using C# from within your Console or Windows Forms Application. private StreamReader DownloadFileFromFTP() { var request…

Continue Reading »

06/01/2015 by Nitesh

Convert Text to Title Case As You Type in TextBox Control in Windows Forms

Friends, In this post we will see how can we convert any text written by user in a TextBox Control to Title Case as they type in. If you don’t know about TitleCase, check it on Wikipedia here. In simple words, any sentence where 1st letter of every word is capital is known as to…

Continue Reading »

05/01/2015 by Nitesh

Change Height of TextBox Control in Windows Forms

Friends, From the title, this seems to be a very simple post that every novice programmer would know but changing the height of a textbox control in a Windows Forms Application is bit tricky that thought. You must be wondering that setting the Size.Height property of the control would do this, but as soon as…

Continue Reading »

02/01/2015 by Nitesh

Validate Email Using Regex in C#

Friends, In this small post, I will show you how we can validate a string as proper email or not using Regex class in C#. Below is the code – public bool ValidateEmail(string emailAddress) { string regexPattern = @”^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$”; Match matches=Regex.Match(emailAddress,regexPattern); return matches.Success; } The above function takes a string parameter and returns if the…

Continue Reading »

29/12/2014 by Nitesh

How To Check If a File Exists In FTP Server in C#

Friends, In my last post, we saw how can we delete a file from FTP server. However, there might be a situation when you try to delete a file and the file does not exist on the server. In this case, code will throw an error saying “550, File Unavailable“. To solve this, we must…

Continue Reading »

1 2 3 4 6