Code behind to send selected index as parameter to webservice to retrieve record
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
LinkButton lk = (LinkButton)e.Row.FindControl("lnk");
lk.Attributes.Add("onclick", "ShowMyModalPopup('"+s+"')");
}
}