Click here to Skip to main content
15,920,217 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi!
i have two different tables. temptable, pictable.
the temptable contains all those usersname whos are online. and pictable contains pictures of all the users who are registered.
now i have an index.aspx page it contains gridview
what i want is to when the page loads it checks the temptable and take pictures of all those users that are present in temptable and show it in gridview.
please tell me how to do it.
thanks in advance
Posted
Comments
_Amy 30-Aug-12 7:57am    
What have you tried yet? Where you stuck?

1 solution

temptable should contains userid (primary key) which is reference key in pictable

for example

temptable:
userid (primary key)
username
pictable:
userid(foreign key)
image

Then add gridview and assigned sqldatasource which has query

Select t.username,p.image
from temptable t join pictable p
on t.userid=p.userid
 
Share this answer
 
Comments
saifullahiit 30-Aug-12 7:22am    
cant understand :( could you please elaborate it thorough code?please
thanks

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