how to add values in array

Posted by nhoyti on Stack Overflow See other posts from Stack Overflow or by nhoyti
Published on 2010-06-14T05:46:51Z Indexed on 2010/06/14 5:52 UTC
Read the original article Hit count: 171

Filed under:
|
|

hi guys,

i just want to ask help again. I've created a method to read values in gridview, i was able to get and read values from the gridview. The problem now, is how can i store the values inside an array and i want it to pass on the other page. here's the code i've created

    private void getrowvalues()
    {
        string combinedvalues;

        foreach (GridViewRow row in gvOrderProducts.Rows)
        {
            string prodname = ((Label)row.FindControl("lblProductName")).Text;
            string txtvalues = ((TextBox)row.FindControl("txtQuantity")).Text;

            combinedvalues = prodname + "|" + txtvalues;
        }
    }

i want the result string combinedvalues to be put in an array or collection of strings which i can be access in other page. Is there a way to do it? Any inputs will be greatly appreciated.

thanks!!

© Stack Overflow or respective owner

Related posts about c#

Related posts about arrays