Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Storing Data from a Column in a Variable

Avatar of adoliv
adolivFlag for South Africa asked on
Programming Languages-OtherMicrosoft Legacy OSWeb Applications
3 Comments1 Solution198 ViewsLast Modified:
Hi Experts

Okay I am creating a ZIP File containing multiple images files, but the filepaths that I require are results from a SQL Query that populate a Gridview.

Process Flow: User Provides A Start Date And End Date > Button 1 Click > SQL Query > Populate Gridview With Results > If User is happy with results > 2nd Button Click > Download ZIP File.

I need to know how I can store all the data in numerous records in one column of the Gridview into a String Variable(Please supply the example code required because I have searched the net for examples for a while and come out with nothing)

Id      FileName      Extension
1      image1      jpg
2      image2      gif
3      image3      jpg

Basically I want to be able to store all the values under the FileName column in a String Variable called "items" (Please view attached Code Snippet or Attached File).
Line 3 = New String() {"", "c:\test\Copy of one.txt", "c:\test\one.txt", "c:\test\o-fone.txt"}

I think is needs to look like this
New String() {"", + items}