About 20,300,000 results
Open links in new tab
  1. How to Convert String Data to Data Table in C# asp.net?

    Mar 6, 2014 · You can use String.Split to break your string into rows and cells. If the column setup is always the same (as it should be), then you can simply add the columns on your first iteration through the cells. Here's a simple example: DataTable dataTable = new DataTable(); bool columnsAdded = false; foreach(string row in data.Split('$'))

  2. Table of strings in C# - Stack Overflow

    Jul 9, 2015 · You can just use a. var table = new List<List<string>>(); This would give you a dynamic 2D table of strings.

  3. arrays - Creating string table .net C# - Stack Overflow

    Aug 6, 2018 · You have to use ArrayList instead of Array. ArrayList<string> arrayList = new ArrayList<>(); for (int i=amount; i >= 0; i--) { arrayList.add(textdata.ToString()); }

  4. Create DataTable from string - Microsoft Q&A

    Apr 7, 2023 · DataTable table = new DataTable(); table.Columns.Add("Application", typeof(string)); table.Columns.Add("Frequency", typeof(string)); table.Columns.Add("Region", typeof(string)); table.Columns.Add("JobName", typeof(string)); var appSettings = System.Configuration.ConfigurationManager.AppSettings.AllKeys .ToDictionary(key => key, …

  5. How to create datatable programmatically from a string using C#?

    Jun 16, 2010 · In this article explain you how to create datatable programmatically from a string using C#. ASP.Net Gridview or other data bound controls are to filled by Dataset or DataTable.

  6. How to Convert a List of Objects to a DataTable in C# - C# Corner

    In real-world C# applications, especially when working with data layers or exporting data (e.g., to Excel, reports, or grids), you may often need to convert a generic list of objects (List&lt;T&gt;) to a DataTable. This article shows you how to do that in a clean, reusable way using reflection.

  7. Create HTML Table using StringBuilder in ASP.Net using C# and …

    Apr 3, 2019 · This article will illustrate how to first generate an HTML String of HTML Table from a DataTable using StringBuilder class and then assign the HTML String to a Literal control and display it on Web Page in ASP.Net using C# and VB.Net.

  8. DataTable In C# - C# Corner

    C# DataTable class represents a data table in C#. Code sample in this article demonstrates how to create a DataTable dynamically in C# code and DataTable rows and DataTable columns and display data in a DataGridView control using DataGridView.DataSource data binding.

  9. Create Table Using StringBuilder in ASP.NET From Code Behind - C#

    In String Builder we can use append keyword. Stringbuilder belongs to System.Text namespace. Open -> MS SQL SERVER 2012 -> Create an Table in database. Now Create Store Procedure in your database. Test the stored procedure. Create Connection from database------->Open web.config--------->Add below Code in Configuration.

  10. DataTable in C# – Usage And Examples - DEV Community

    Jun 18, 2024 · Creating a table and adding columns is just the beginning. We’ll now add the lifeblood of a table – data! DataRow represents a single row in the DataTable. Here’s how to add them: With these few lines of code, our Customer table has its first row of data! Building a DataTable from scratch gives us an empty canvas to work with.

  11. Some results have been removed
Refresh