title: How to Convert String Data to Data Table in C# asp.net?
body: <p>So far I have tried to convert <code>DataTable</code> to <code>String</code> as follow:-</p>
  
  <pre><code>public static string convertDataTableToString(DataTable dataTable)
      {
          string data = string.Empty;
          int rowsCount = dataTable.Rows.Count;
          for (int i = 0; i &lt; rowsCount; i++)
          {
              DataRow row = dataTable.Rows[i];
              int columnsCount = dataTable.Columns.Count;
              for (int j = 0; j &lt; columnsCount; j++)
              {
                  data += dataTable.Columns[j].ColumnName + "~" + row[j];
                  if (j == columnsCount - 1)
                  {
                      if (i != (rowsCount - 1))
                          data += "$";
                  }
                  else
                      data += "|";
              }
          }
          return data;
      }
  </code></pre>
  
  <p>Now I want to convert returned string into <code>DataTable</code> again. </p>