Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
List<int> list = new List<int>();
            for (int i = 0; i < 1; i++)
            {
                TextBox tb = (TextBox)Page.Form.FindControl(("txt" + i));
                string value = tb.Text;

                arrLIst.Add(value);//hear i get textbox value

           }
           string num1 = Convert.ToString(arrLIst[0]);
           

            SqlDataAdapter adp = new SqlDataAdapter("select id from Tll where type_id = 56 ", con);
            DataSet ds = new DataSet();
            adp.Fill(ds);
            adp.Dispose();

            string valu12 = Convert.ToString(ds.Tables[0].Rows[0]["id"]);//here i get id of table

        }


how to add the textbox vlue and id another table.
Posted
Updated 24-Jul-12 22:09pm
v3
Comments
_Amy 25-Jul-12 4:39am    
Your question is not clear..
Muhammad Shahid Farooq 25-Jul-12 5:16am    
Please explain your question, I am unanble to understand your statement what exactly you want.
Sandeep Mewara 25-Jul-12 5:46am    
This is not a well framed question! We cannot work out what you are trying to do/ask from the post. Please elaborate and be specific.
Use the "Improve question" link to edit your question and provide better information.
Vani Kulkarni 25-Jul-12 6:26am    
Your question is unclear. Please elaborate.
nguwar 26-Jul-12 4:25am    
I assume you want to add to another datatable?
Here is the example.
int id = 0;
string value = "";
DataTable dt = new DataTable("myTable");
dt.Columns.Add("ID");
dt.Columns.Add("Value");
dt.Rows.Add(id, value);

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900