Hi
I need do display a popup message (feedback) on click of linkbutton in gridview
my Aspx.cs code
protected void gridstdnt_ItemCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
if (e.CommandName == "View")
{
int RowID = e.Item.ItemIndex;
int StudId = int.Parse(gridstdnt.Items[RowID].Cells[0].Text.Trim());
Session["StudId"] = StudId;
LinkButton lnkstdntview = (LinkButton)e.Item.FindControl("lnkstdntview");
lnkstdntview.OnClientClick = "javascript:popup_window=window.open('popupfeedback.aspx?StudentId=" + Session["StudId"] + "','popup_window','width=350,height=150,top=150,left=625,scrollbars=1');popup_window.focus()";
}
}
Aspx code
<asp:TemplateColumn HeaderText="View Feed Back">
<ItemTemplate>
<asp:Label ID="lblstudentid" runat="server" Visible="false" Text='<%#DataBinder.Eval(Container, "DataItem.StudentId")%>'></asp:Label>
<asp:LinkButton ID="lnkstdntview" runat="server" CommandName="View" CommandArgument='<%#DataBinder.Eval(Container, "DataItem.StudentId")%>'>View</asp:LinkButton>
</ItemTemplate>
</asp:TemplateColumn>
With this code iam getting the same msg(feedback) for all rows
Regards
Babu