Hi Sandeep,
in my code Label lbl and the link button creates at runtime in a table...
The ID of these label and linkbutton are getting from the database table values.
so i dont know how i will access that ID of the particular label in the click event of the link button...... i modified my code using your inputs..... still not able to get the result... i am copying the modified code below..
Do While ros >= 0
Dim lbl As Label = New Label()
lbl.Text=ds.Tables(0).Rows(ros)("News")
lbl.ID = "lbl" + (ds.Tables(0).Rows(ros)("NewsId")).ToString
Dim btnChange As LinkButton = New LinkButton()
btnChange .Text = "Update"
btnChange .ID = ds.Tables(0).Rows(ros)("NewsId")).ToString
AddHandler btnChange.Click, AddressOf btnChange _Click
ros = ros - 1
Loop
Private Sub btnChange_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim btn As LinkButton = sender
Dim newsId As String = btn.ID.ToString
Dim txtlblID As String = "lbl" + newsId
Dim lbl As Label = New Label
lbl.ID = "lbl" + newsId
Dim txt As String = lbl.Text
End Sub