問題
使用 LinkButton另開視窗
解決方法
protected void gv_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
string selectEntity = ((LinkButton)e.Row.Cells[0].FindControl("lkbENTITY")).Text.Trim();
((LinkButton)e.Row.Cells[0].FindControl("lkbENTITY")).OnClientClick = string.Format("window.open('{0}');", "http://192.168.2.1/default.aspx?entity="+ selectEntity
}
}
沒有留言:
張貼留言