E
Eric
Hi,
there are several gridviews all with a linkbutton which all trigger the same
procedure.
I need to know from which gridview the linkbutton has been clicked.
Thanks
Eric
Here the code:
<asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1" >
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="lb1" OnClick="go" runat="server"
Text="go">
</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="n1" ReadOnly="True"/>
</asp:BoundField>
</Columns>
</asp:GridView>
<asp:GridView ID="GridView2" runat="server" DataSourceID="SqlDataSource1" >
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="lb1" OnClick="go" runat="server"
Text="go">
</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="n2" ReadOnly="True"/>
</asp:BoundField>
</Columns>
</asp:GridView>
Protected Sub go(ByVal sender As Object, ByVal e As System.EventArgs)
dim gv as string
'need to get into a variable the name of the gridview where the linkbutton
has been clicked
End Sub
there are several gridviews all with a linkbutton which all trigger the same
procedure.
I need to know from which gridview the linkbutton has been clicked.
Thanks
Eric
Here the code:
<asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1" >
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="lb1" OnClick="go" runat="server"
Text="go">
</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="n1" ReadOnly="True"/>
</asp:BoundField>
</Columns>
</asp:GridView>
<asp:GridView ID="GridView2" runat="server" DataSourceID="SqlDataSource1" >
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="lb1" OnClick="go" runat="server"
Text="go">
</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="n2" ReadOnly="True"/>
</asp:BoundField>
</Columns>
</asp:GridView>
Protected Sub go(ByVal sender As Object, ByVal e As System.EventArgs)
dim gv as string
'need to get into a variable the name of the gridview where the linkbutton
has been clicked
End Sub