foreach (DataRow dr in dt.Rows)
{
html += "<tr class=\"GreyBorder\" id='tblFilesGrid_" + dr["Id"].ToString() + "'
pkid=\"" + dr["id"].ToString() + "\" class=\"DataRow\">";
html += "<td class=\"GreyBorder\" style=\"text-align:center !important;\">" + Count +
"</td>";
html += "<td align=\"center\" >" + dr["Name"] + "</td> ";
html += "<td class=\"GreyBorder\" align='center'><img id='view' title='view'
onclick=showDocument('" + dr["id"] + "'); src='../../Images/folder.gif'>   
<img title='remove' onclick='return DeleteRow(this)' src='../../images/delete.png'>
</td>";
html += "</tr>";
Count++;
}
This is my dynamic grid which has an onclick function showDocument. I need to code this function in my code behind. For this I have added runat server attribute in my div tag in aspx page. How would I modify this line of code now to access my function in code behind??
html += "<td class=\"GreyBorder\" align='center'><img id='view' title='view'
onclick=showDocument('" + dr["id"] + "'); src='../../Images/folder.gif'>   
<img title='remove' onclick='return DeleteRow(this)' src='../../images/delete.png'>
</td>";
I added runat server attribute in my aspx but after adding runat server, my grid is not showing.
<div id="divFilesGrid" runat="server" > </div>