目前我綁定數據集與數據網格。ASP.NET Datagrid HTML輸出(顯示)
ds = query.ExecuteReadQuery("select PollQuestionText as 'Survey Question',
PollAnswer1Text as 'Selection 1', PollAnswer2Text as 'Selection 2', PollAnswer3Text
as 'Selection 3', PollEnabled 'Status' from tbl_pollquestions")
For Each row As Data.DataRow In ds.Tables(0).Rows
If row.ItemArray(4).ToString = "0" Then
row.ItemArray."<a href=""""> <img src=""img/box_icon_edit_pencil1.gif"" border=""0""> </a>"
ElseIf row.ItemArray(4).ToString = "1" Then
row.Item(4) = "<a href=""""> <img src=""img/box_icon_edit_pencil2.gif"" border=""0""> </a>"
End If
Next
GridView1.DataSource = ds
GridView1.DataBind()
因爲我插入html代碼,爲什麼這不是被轉換爲html?
輸出結果是全部文本。 (假設圖標顯示時沒有重定向url)
我不知道爲什麼。
感謝