Get youtube video thumbnail image in

Here is an example for how to obtain a url of thumbnail image of a youtube video programmatically in, get youtube video thumbnail in

Below is the code that returns image thumbnail url of given youtube video url by passing video url as a parameter in GetYouTubeImage method.

Calling a method of parent page from user control

In my previous post i explained about how to handle events of usercontrol in parent page in and here i am going to explain

How to call a function from a usercontrol on the Parent form.

All you need to pass a event to the parent page to call method across the page and control, you can call parent page methods in usercontrol as well as usercontrol methods in the parent page through the concept of events and delegates.

Handle events of usercontrol in parent page in

Some time we need to make a global functionality for our project then we think about usercontrol and call it to the webpage but what about when all common functionality remains same but some controls event functionality varies according to the page, means we need button click or check box check change or dropdown selected index change event on the parent page.

How to upload a file in using fileupload control c#

Here is an example which is for how to upload and save a file through fileupload control in c# with validating files content type, size of file and extension of file as you want .jpg or .png etc.

Regular expression for alphanumeric with space in c#

How to validate that string contains only alphanumeric value with some spacial character and with whitespace and how to validate that user can only input alphanumeric with given special character or space in a textbox (like name fields or remarks fields).

In remarks fields we don't want that user can enter anything, user can only able to enter alphanumeric with white space and some spacial character like -,. etc if you allow.

Some of regular expression given below for validating alphanumeric value only, alphanumeric with whitspace only and alphanumeric with whitespace and some special characters.

regex - check if a string contains only alphabets c#

How to validate that input string contains only alphabets, validating that textbox contains only alphabets (letter), so here is some of the ways for doing such task.
char have a property named isLetter which is for checking if character is a letter or not, or you can check by the regular expression  or you can validate your textbox through regular expression validator in

Following code demonstrating the various ways of implementation.

Reverse number program in c#

Reversing given number without using any built-in function or method just use only basic function, this is often asked question in the interview.

Following sample code is for reversing number using simple basic function, method takes only a number as input and returns reversed number of given input number in c#.

Get max occurred character in string in c#

Most of the time in interview (fresher or 1 year) interviewer asks this questing and says that not to use inbuilt function use only basic function and find maximum occurring character for a string entered as well as find the no of occurrence of that character.

Following code find the maximum occurring character in the given string it takes string as a input and returns maximum occurred character as char of that string.

Recent Article