Click here to Skip to main content
15,890,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, i've hit a deadend with my webpage, i can get data to display in the dataview and everything now need a 2nd datagrid to pop up once a certain label has been clicked on with information containing to that label(label will be discription to whats in the datagrid)

any help will be appreciated
thanks:)
Wes
Posted
Comments
Sanjay Kunjam 5-Jul-12 9:24am    
Why you want to use label 'Click Event'. ASP.NET Label doesn't have the event 'Click'.

Some more descriptions needed for your question.
govardhan4u 5-Jul-12 9:27am    
is the second grid independent of the content of the first grid?
Wes101 5-Jul-12 9:31am    
ive only been coding in asp.net for a few weeks now nt sure on everything yet, and no its not independant it relies on data from the first grid, thru a member_id field which is in the first datagrid table
Wes101 5-Jul-12 9:33am    
is it possible to use the label as a link to pop up the 2nd data grid? just curious
Yatin chauhan 5-Jul-12 10:43am    
Why you need label to use click event???
please specify something more.

1 solution

You can acheive this by

1. Add <asp:hyperlink xmlns:asp="#unknown"></asp:hyperlink> instead of <asp:label xmlns:asp="#unknown"></asp:label> Apply CSS to HyperLink to look like as a normal Label then Handle the onClick event for Hyperlink

2. Or write a javascript onlcick for the label then call serverside code from javascript

Mark it as solution if it answer your question
 
Share this answer
 
Comments
Wes101 5-Jul-12 9:39am    
thanks ill try it out
Shemeer NS 5-Jul-12 9:40am    
wc

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