2013-01-22 51 views
0

我從查詢數據庫,並顯示數據InnerHtmlScrenshot的innerHTML動態

我想補充checkboxinnerHtml就像我在這不結果的部分圖像中的紅色checkbox創建。我如何在InnerHtml中添加checkbox,如紅色?

WebBrowserDocument += 
           "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">" + 
           "<tr>" + 
           "<td width=\"5\" bgcolor=\"#" + ContentTone + "\"></td>" + 
           "<td width=\"8\"></td>" + 
           "<td>" + 
            " <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"700\"> " + 
            " <tr> " + 
            " <td class=\"MainHeadline\"><a href=\"|play|" + urlString + "\"> " + 
            " " + makeBold(dr["issues"].ToString()) + " " + 
            " </a>" + 
            " <span class=\"MainHeadlinePart\">" + makeBold(dr["ProvinceName"].ToString()) + " - " + makeBold(dr["CityName"].ToString()) + " - " + makeBold(dr["AreaName"].ToString()) + "</span>" + 
            "</td> " + 
            " </tr> " + 
            " <tr> " + 
            " <td class=\"line2\"> " + 
            " " + dr["channelName"].ToString() + " " + dr["transmissionDate"].ToString() + " " + dr["startTime"].ToString() + 
            " </td> " + 
            " </tr> " + 
            " <tr> " + 
            " <td class=\"programName\"> " + 
            " " + makeBold(dr["programName"].ToString()) + " - " + dr["programTypeName"].ToString() + " (" + dr["contentType"].ToString() + ") " + 
            " </td> " + 
            " </tr> " + 
            " <tr> " + 
            " <td class=\"descriptions\"> " + 
            " " + makeBold(dr["KeyWords"].ToString()) + "</td> " + 
            " </tr> " + 
            " <tr> " + 
            " <td class=\"persons\"> " + 
            " " + makeBold(dr["personsName"].ToString()) + " " + 
            " </td> " + 
            " </tr> " + 
            " <tr> " + 
            " <td class=\"persons\"> " + 
            " " + makeBold(dr["PartiesName"].ToString()) + " " + 
            " </td> " + 
            " </tr> " + 
            " <tr> " + 
        //" <td class=\"descriptions\"> " + 
        //" <a href=\"|update|" + urlString + "\">Update</a> | <a href=\"|delete|" + urlString + "\">Delete</a> | <a href=\"|save|" + urlString + "\">Save To Hard Drive</a> | <a href=\"|saveAsWMV|" + urlString + "\">Save As WMV</a>" + 
        //" </td> " + 
            " <td class=\"descriptions\"> " + 
            " <a href=\"|download|" + urlString + "\">Download</a>" + 
           " </td> " + 
           " </tr> " + 
           " </table> " + 
          " </td> " + 
          " </tr> " + 
          " </table> " + 
           " <br /> "; 

您可以在最後一行代碼中看到下載標籤。 我想要複選框以及下載標籤。

+1

你從哪裏得到的結果HTML?你知道那個結構嗎? – ryadavilli

+0

結果正在從數據庫中獲取 – Mohsinjan110

+0

將其添加到您的中繼器模板中 –

回答

1

" <a href=\"|download|" + urlString + "\">Download</a>" +添加您的複選框,它應該是這樣的:

" <a href=\"|download|" + urlString + "\">Download</a>" + 

"<input type='checkbox' name='chkbox' value='chkbox'>" 
+0

更改爲有效標記imo的屬性值的雙引號。 – Johan

+0

非常感謝你muhmoud :)你幫我擺脫那個洞;) – Mohsinjan110

+0

高興地幫助:) –