Click here to Skip to main content
15,792,403 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm trying to add the value to arraylist index[0] here it is

DataTable dt5 = new DataTable();
dt5.Columns.Add("Data", typeof(string));
DataRow dr = dt5.NewRow();
ArrayList ary = new ArrayList();
foreach (Control ctr in dynamic.Controls)
    if (ctr is TextBox)
        string IDs = ((TextBox)ctr).ID;
        string values = ((TextBox)ctr).Text;
        string text= values;
        ele = (new XElement(IDs, values));
        ary.Insert(0, ele) ;
dr[0] = ary;

here the "ele" object gets the result as Xmlvalues <id>75 and next the loop repeats it get other value <name>Usha

I wanna store this values as single row so im trying to do it in arraylist index method
but it is storing in number of indexes like index[0],index[1].

So I wanna store this multi values in single row and pass as single parameter to my stored procedure
Updated 7-May-14 22:47pm

1 solution

I got a solution for this

StringBuilder sb = new StringBuilder();
var data=Convert.ToString(sb);
And i can pass this var data to my Stored procedure
Share this answer

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