Click here to Skip to main content
15,889,659 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I want to Create a link Button Depends on Database field.if the Database filed contains value the n the link button will be created and get the text of database field.if the database field is null no need to create the link button.
i tried this

Dim lk As LinkButton
        Dim br As HtmlGenericControl
        For index As Integer = 1 To 10
            lk = New LinkButton
            lk.ID = index
            lk.Text = index
            pnlAttachment.Controls.Add(lk)


its not working.
Suugest me to Get the Solution
Posted

1 solution

 
Share this answer
 
Comments
[no name] 5-May-14 6:32am    
i Already saw these links. its not working for me
Sampath Lokuge 5-May-14 6:34am    
Not working means ? are there any errors or what ? Have you put a debug and checked ?
[no name] 5-May-14 10:13am    
No,it does not shows any error but i can't get the Solution.ie,the Link button do not be created
Sampath Lokuge 5-May-14 10:17am    
Have you put a debug and checked ? If you properly instantiate the link button, it should create.Just create a single link button and check.Then you can easily find the issue.

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