Click here to Skip to main content
15,912,069 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Everyone,

I want to use a dynamic link button over the sql data which gets displayed
on the page.

e.g.,
If I have column Name "MobileNo" in database, when I get the count(say 5) of MobileNo on the web page. I want to click that count value(say 5) and it should navigate to some other page showing all the 5 MobileNo's..

Please anyone suggest me on this....

Regards,
Posted
Updated 27-Feb-11 22:27pm
v3

1 solution

What's in it?

STEPS:
1. Get the mobile number count from DB
2. Set that as a text to hyperlink
3. On hyperlink click event, set the unique identfier that identifies those 5 numbers as a query string or session or form variables - your choice based on application
4. On new page, based on the selection, hit the DB and get those records.

Try!
 
Share this answer
 
Comments
Espen Harlinn 26-Feb-11 9:29am    
Nice recipe, my 5
Raj.rcr 28-Feb-11 0:31am    
sorry, its not working... I tried with the link button..
arindamrudra 28-Feb-11 2:39am    
What have you taken? Gridview or Repeater? Or, you are using it directly. If you are using repeater then write your necessary code in itemdatabind event. else in case of link button linkbutton1.text = the count return from database and write necessary code on click event of that button. Or, in case of a repeater use anchertag.
arindamrudra 28-Feb-11 2:44am    
Sandeep gave the correct solutions. Why it is not working? So, us some of your code.
Raj.rcr 28-Feb-11 4:25am    
No, I am not using repeater or gridview. I am looping through html code and using the <tr> data, I am getting the database column's counted values. But the problem is, if I click the particular value, I want another page to be redirected with the details of the counted values.

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