This tutorial will show you how to cut string using ASP.NET 2.0 and C#. This tutorial uses default namespace. The sample will show you how to intercept the character string and restrict the character length. Moreover, it will automatically turn to the newline.

In order to run the example, we will use the btn_cut_Click to trigger the task. The code as following:

The front end CutStringCsharp.aspx page looks something like this:

The flow for the code behind page is as follows

Download Source Files