i have a repeater control and on ItemDataBound event i want fetch values in the repeater control and redirect to another page by passing those values as parameter.
i have written the following code
Protected Sub rptData_ItemDataBound(ByVal source As Object, ByVal e As RepeaterItemEventArgs)
Dim content As String = ""
Dim url As String = ""
Dim lbl1 As Label = TryCast(e.Item.FindControl("content"), Label)
Dim lbl2 As Label = TryCast(e.Item.FindControl("url"), Label)
content = lbl1.Text
url = lbl2.Text
Dim btn As LinkButton = CType(e.Item.FindControl("glossary"), LinkButton)
btn.Attributes.Add("onclick", "Response.Redirect('glossary.aspx?cont=' + content + 'url=' + url)return true;")
end su
just modifiy below line of code because there is an error because of this only
there is no need of
respose.redirectyou need to redirect so you use javascriptlocationobject as i shown belowor
just set prostbackurl property of link button