Tuesday, 26 August 2014

It is very easy to configure selenium tool for asp.net website or project.

We can configure selenium tool and it's DLL into Visual Studio by creating new 'website' or 'project' or in Existing 'website' or 'project'.

In previous article you can see the article of how to download selenium webdriver tool.

Here are some steps to configure selenium webdriver tool :

STEP 1 : Open Visual Studio like VS2010, VS2012 or VS2013
STEP 2 : Go to File menu and click on 'New Web Stite' Menu, Now it will open dialog box in that dialog box select 'Empty Web Site' template and give your website name in below text box. After that click on 'OK'. Now your website is created.

Friday, 22 August 2014

Selenium is an excellent tool for automate series of use actions. It is also very useful for  testing.
Selenium is a very useful tool for web application testing. We can integrate selenium tool in our ASP.Net website and do automation as well as testing.

Here we are providing series of learning selenium tool.

Download selenium is the first stage to learn selenium.

STEP 1 : Go to selenium HQ URL, URL is 'http://www.seleniumhq.org/download/'.

STEP 2 : After that, scroll down page and find the 'Download' link in order to download zip file. You can see the Programming Language wise download link. Click on download link of C# row. You can see this in below image. After that, you can see download dialog box and save that in you local folder.

Wednesday, 2 July 2014

It is very easy to remove string's leading and trailing white spaces using Regex.

 The Regex is "^\s+|\s+$".

Here is example of this.

In this example we are taking on string which has leading and trailing white spaces. We can remove this spaces using Regex.

C#. Net Example :
string strData = "            This string contains leading and trailing white spaces             ";
strData = Regex.Replace(strData, @"^\s+|\s+$", "");
Response.Write(strData);

VB.Net Examples :
Dim strData As String = "            This string contains leading and trailing white spaces             "
strData = Regex.Replace(strData, "^\s+|\s+$", "")
Response.Write(strData)

  
Click here for other post regarding Remove only leading white spaces from string using Regex with C#.Net and VB.Net example


Click here for other post regarding Remove only trailing white spaces from string using Regex with C#.Net and VB.Net example


Wednesday, 25 June 2014

It is very easy to remove string's trailing white space.

We can achieve using Regex. The Regex is "[ \t]+$".

Here is example of this.

In this example we are taking on string which has trailing white space. We can remove this spaces using Regex.

C#. Net Example :
string strData = "This string contains trailing white spaces             ";
strData = Regex.Replace(strData, "[ \t]+$", "");
Response.Write(strData);

VB.Net Examples :
Dim strData As String = "This string contains trailing white spaces             "
strData = Regex.Replace(strData, "[ \t]+$", "")
Response.Write(strData)


Click here for other post regarding Remove only leading white spaces from string using Regex with C#.Net and VB.Net example

Click here for other post regarding Remove leading and trailing white spaces from string using Regex with C#.Net and VB.Net example.  


Wednesday, 18 June 2014

It is very easy to remove string's leading white space.

We can achieve using Regex. The Regex is "^[ \t]+".

Here is example of this.
In this example we are taking on string which has leading white space. We can remove this spaces using Regex.

C#. Net Example :
string strData = "   This string contains leading white spaces";
strData=Regex.Replace(strData, "^[ \t]+", "");
Response.Write(strData);

VB.Net Examples :
Dim strData As String = "   This string contains leading white spaces"
strData = Regex.Replace(strData, "^[ \t]+", "")
Response.Write(strData)


Click here for other post regarding Remove only trailing white spaces from string using Regex with C#.Net and VB.Net example

Click here for other post regarding Remove leading and trailing white spaces from string using Regex with C#.Net and VB.Net example.  
 

Tuesday, 13 May 2014

Click Here to Download CustomRazorHelperClass.zip

It is very easy to write custom razor helper class. After creating custom razor helper class, we can use these classes anywhere in MVC Application.

Here is step by step explanation of creation of razor helper class.

STEP 1 :
First create MVC web application if you do not have MVC Web Application

STEP 2 :
Now Add new "App_Code" folder. In this folder add MVC Razor View page (MVC 4 View Page (Razor)).

To do this, you need to do right click on 'App_Code' folder and click on "Add New Item" menu. It will display dialog box to add new item. After that add 'MVC 4 View Page (Razor)' Page. Give it named like 'CustomRazorHelper.cshtml'.

Now we add one method name 'ToTitleCase', this method makes first character upper case of given statement and make rest of the characters lower case.

Wednesday, 23 April 2014

Click Here to Download PlayVideoInMVC.zip

It is very easy to play or display video in ASP.NET MVC using HTML5. We can do this using custom action filter in MVC. We can play various files like MP4, Ogg, WebM, etc. format.

Here are step by step tutorial to play video in ASP.NET MVC using HTML5.

Here is example for this.