在DataGrid中建一个模板列,在模板列中放一个客户端的Button,或者直接写你要的字句,然后用
1<a href="">连接
2例:
3<table align="center" border="0" cellpadding="0" cellspacing="0" id="Table1" width="100%">
4<tr>
5<td width="100%">
6<asp:datagrid allowcustompaging="True" allowpaging="True" autogeneratecolumns="False" bordercolor="White" borderwidth="1px" datakeyfield="id" gridlines="Horizontal" id="dgFreightInfo" pagesize="20" runat="server" width="96%">
7<itemstyle backcolor="#F7F7F7" height="25px"></itemstyle>
8<headerstyle backcolor="#E8E8E8" font-bold="True" height="25px" horizontalalign="Center"></headerstyle>
9<columns>
10<asp:templatecolumn>
11<itemtemplate>
12<a href='javascript:onclick=LoadFreight(```
13# DataBinder.Eval(Container,"DataItem.id")
14```)'>
15详细信息</a>
16</itemtemplate>
17</asp:templatecolumn>
18</columns>
19</asp:datagrid>
20</td>
21</tr>
22然后写一个JavaScript方法
23<script language="javascript">
24function LoadFreight(id)//id为传进的参数
25{
26var url='url.aspx?tid='+id+'';
27window.open(url,'','scrollbars=yes,top=0,left=0,resizable=no,status=no,toolbar=no,menubar=no,location=no,width=430,height=600');
28}
29</script></table></a>