|
-
Mar 11th, 2010, 11:23 AM
#1
Thread Starter
Addicted Member
Get Datalist value
I have a datalist that shows Label, Label2 and has 8 rows of data.
I would like to store the value in Label2 row 8 in a session variable... how can i do this in VB.net?
-
Mar 11th, 2010, 01:41 PM
#2
Re: Get Datalist value
Hey,
What is the requirement for this?
Can you store the value when the DataList is bound? On at what point do you want it added to the Session?
Gary
-
Mar 11th, 2010, 02:01 PM
#3
Hyperactive Member
Re: Get Datalist value
yes you can...but i'm preety curious about the situation...!
fire the query using sqlcommand object and get the data in reader..
and from reader add to array list and finally add arraylist to session..
-
Mar 12th, 2010, 04:25 AM
#4
Thread Starter
Addicted Member
Re: Get Datalist value
My datalist contains the results of a total of all the different financial totals by line type with a grand total at the bottom (row 8 of the datalist).
I would like to be able to insert that value into a total_revenue field in my sql database when the user has reviewed the information and clicked a button, so i guess on databound would be fine.
I hve been playing around with vb code such as DataList3.DataKeys(7).ToString() but clearly this is not the right approach.
-
Mar 12th, 2010, 07:42 AM
#5
-
Mar 12th, 2010, 08:46 AM
#6
Thread Starter
Addicted Member
Re: Get Datalist value
I couldnt get the right combination of the properties of datalist3 to be able to return the value.
The 8th row of my data list is the total so on rowdatabound i want to set a variable or session to equal the value of DataList3 column 1 row 8.
In my head it works but i cant get that value to return.
-
Mar 12th, 2010, 09:39 AM
#7
Hyperactive Member
-
Mar 13th, 2010, 04:43 AM
#8
Re: Get Datalist value
stephena,
We are not really going to be able to help you until you start explaining exactly what you want to do. Perhaps showing some of your code will help?
Gary
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|