Loading

GridView里做页面的链接

采用Gridview的OnRowDataBound属性

后台

protected void gvTranslateInfo_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if(e.Row.RowIndex>=0)
            {
                if(e.Row.RowType==DataControlRowType.DataRow)
                {
                    e.Row.Cells[1].Text = "<a target=_blank href=\"http://wfweb.test.aspirecn.com/pzgl/page/WorkFlow/BBBY/BBBY_Default.aspx?sid=5&mid=184089&pid=" + e.Row.Cells[1].Text.ToString() + "&tid=5\">" + e.Row.Cells[1].Text.Replace("&amp;lt;", "<").Replace("&amp;gt;", ">") + "</a>";
                }
            }
        }

 

posted @ 2014-05-27 10:19  眾尋  阅读(210)  评论(0编辑  收藏  举报