i have a solution to my problem. i add the value to clipboard before i add it to a temporary table.
HTML
<textarea id="TextArea1" name="TextArea1" cols="80" rows="10"></textarea>
<br />
<asp:Button Text="Save" OnClick="ReloadCtl_Click" runat="server" OnClientClick="pasteContent()" />
<br />
<asp:GridView ID="GridView1" runat="server" />
Namespaces
using System.Data.SqlClient;
using System.Data;
using System.Configuration;
C#
protected void ReloadCtl_Click(object sender, EventArgs e)
{
string constr = ConfigurationManager.ConnectionStrings["conString"].ConnectionString;
int i = 0;
string clip = Request.Form["TextArea1"];
string[] part = clip.Split('\n');
for (i = 0; i < part.Length - 1; i++)
{
using (SqlConnection con = new SqlConnection(constr))
{
using (SqlCommand cmd = new SqlCommand("INSERT INTO Table_1 VALUES (@Row)", con))
{
con.Open();
cmd.Parameters.AddWithValue("@Row", part[i]);
cmd.ExecuteNonQuery();
con.Close();
}
}
}
DataTable dt = new DataTable();
using (SqlConnection con = new SqlConnection(constr))
{
using (SqlCommand cmd = new SqlCommand("SELECT * FROM Table_1", con))
{
using (SqlDataAdapter da = new SqlDataAdapter(cmd))
{
da.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
}
}
}
}
SQL
CREATE TABLE [dbo].[Table_1](
[Value] [varchar](100) NULL
) ON [PRIMARY]
GO
Screenshots
Excel File from where i have copied the Data.

Page
