there are two ways...if you have few values to show in PopUp you can simple bind them at runtime to the link button.
If you have too many values you will have to create an Object of the class. So if you are showing user information in the popup create an object of the User Class. serialize it and bind to the click event of link button
//Global variable which will serailze.
ReadOnly _js As New JavaScriptSerializer
Protected Sub rptSearchResults_ItemDataBound(sender As Object, e As System.Web.UI.WebControls.RepeaterItemEventArgs) Handles rptSearchResults.ItemDataBound
Try
If e.Item.ItemType = ListItemType.Item OrElse e.Item.ItemType = ListItemType.AlternatingItem Then
Dim drv As DataRowView = TryCast(e.Item.DataItem, DataRowView)
userObj = New Users
userObj.UserId = DataBinder.Eval(e.Row.DataItem, "userId")
userObj.UserName = DataBinder.Eval(e.Row.DataItem, "userNm")
Dim lnkBtn As HtmlAnchor = TryCast(e.Item.FindControl("lnkBtn"), HtmlAnchor)
Dim btnUser As HtmlInputButton = TryCast(e.Item.FindControl("btnNewBCD"), HtmlInputButton)
If Not (lnkBtn Is Nothing) Then
lnkBtn.Attributes.Add("href", "javascript:OpenPopUp('" & drv("acct_id").ToString() & "','" & drv("acct_nm").ToString() & "');")
End If
If Not (lnkBtn Is Nothing) Then
btnUser.Attributes.Add("href", "javascript:OpenPopUp('" & _js.Serialize(userObj)& "');")
End If
Catch ex As Exception
Throw
End Try
End Sub
ASPX Page will have the code to open the modal PopUp
fucntion OpenPopUp(a,b){
}
function OpenPopUp(a)
{
if (typeof a !=="undefined")
{
lbl.val(a.UserId)
}
}