//前台
<asp:TemplateField HeaderText="编辑" ShowHeader="False">
<ItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="false"
CommandName="Select" Text="编辑"
ForeColor="#7B7B7B" CommandArgument='<%# Eval("ID") %>'
onclick="LinkButton1_Click1"></asp:LinkButton>
</ItemTemplate>
<HeaderStyle Width="40px" />
<ItemStyle ForeColor="#7B7B7B" HorizontalAlign="Center" Width="40px" />
</asp:TemplateField>
//后台
string ID = (((LinkButton)sender).CommandArgument.ToString()).ToString();//获取当前行的ID值
Page.ClientScript.RegisterStartupScript(Page.GetType(), "",
"<script>window.open('Show.aspx?id=" + ID + "','newwindow','status=1,scrollbars=1,resizable=1')</script>");