Click here to Skip to main content
15,886,724 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
want to tranfer data displaying in datalist view to the .cs file.. Is it possible or not?

i am trying to build fb status-comment box and need help.
->i have created two tables "STATUS" and "COMMENT".
->STATUS table contains 'uid','status','st_id' where COMMENT table contains 'uid','comment','st_id_fk'.
->when i login then all st_id are selected for that user uid. which i have stored in string "string[] a = new string[50]".
->but now i have to call every st_id individually and select comment from the COMMENT table.
-> How can i do so?
Need to submit my project soon please help me..
Posted
Updated 12-Mar-11 18:59pm
v3
Comments
m@dhu 13-Mar-11 1:00am    
use improve question to update your question.

Hello naveen,
Here is solution for you:
1)
Arraylist tempArraylist=new Arraylist();
Add st_id for selected uid into tempArraylist instead of adding it into string array.

2) Now look out for comment against that particular st_id as
foreach (object obj in tempArraylist)
{
//lookout for the comments against that obj i.e st_id
}

---- Regards
Pavanraje
 
Share this answer
 
thanx 4 understanding my problem Pavanraje...

but my problem is that i have to take all Comments below every Status(st_id) for unique user ID in datalist view.

your answer is correct but i can not make that display in datalist view.
i am new in ASP.NET so plzz help me to solve it.

for ex..
if user 1 log in then
-> all st_id (for eg. 3,4,5) along with status are selected in datalist view.
-> then for st_id = 3 i have to select all comments from COMMENT table
simillarly for st_id 4 and 5.

my problem
1. st_id are always dynamic for every userId then how to call COMMENT table for every dynamic st_id in datalist?
2. how datalist view can take dynamic values at run time?
 
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