0
私は、文字列ビルダを使用してオンザフライでブートストラップテーブルを作成する関数を持っています。そして、私はコードビハインド機能を引き起こすonclickイベントを追加したいと思います。 TRにonclickイベントを追加しましたが、クリックしても何も起こりません。 asp.net vb - ブートストラップテーブル行のonclickイベントがコードビハインド機能を起動しない
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim sContent As New StringBuilder
Dim sParam as new string = Request.Querystring("p")
sContent.AppendLine("<table class='table table-hover table-striped table-condensed table-responsive table-bordered'>")
sContent.AppendLine("<tr style='cursor: pointer;' onclick='viewDetail('" & sParam & "')>")
sContent.AppendLine("<td style='width:10%;text-align:center'>" & startTime & "</td>")
sContent.AppendLine("<td style='width:10%;text-align:center'>" & matchStatus & "</td>")
sContent.AppendLine("<td style='width:30%;text-align:right'>" & sHomeName & "</td>")
sContent.AppendLine("<td style='width:5%;text-align:center;font-weight:bold'>" & sResultFT & "</td>")
sContent.AppendLine("<td style='width:30%;text-align:left'>" & sAwayName & "</td>")
sContent.AppendLine("<td style='width:5%;text-align:center'>" & sResultHT & "</td>")
sContent.AppendLine("<td style='width:10%'></td>")
sContent.AppendLine("</tr>")
sContent.AppendLine("</table>")
Response.Write(sContent.ToString)
End Sub
Protected Sub viewDetail(ByVal sPar as String)
'====Here's the code===
End Sub
は、私はテーブルの
TRセクションでのonclick =「viewDetail」
を追加するが、それはviewDetailをトリガしませんでした。ここに完全なコードです。私は何かを忘れましたか?ありがとう。
これを行う方法?? – Robert
ここから読めるので、詳細http://www.codeproject.com/Questions/531473/callplusfunctionplusinplus –