私は現在、ウェブサイトを開発中です。私は、外部のjsのコードは私がやりたいことのGridViewに選択された行のIDを取得しているメッセージボックスにIDを表示する方法は?
function DeleteConfirm(rfqcodeLB) {
var confirm_value = document.createElement("INPUT");
confirm_value.type = "hidden";
confirm_value.name = "confirm_value";
if (confirm("Are you sure you want to delete" + rfqcodeLB +" ?")) {
confirm_value.value = "Yes";
} else {
confirm_value.value = "No";
}
document.forms[0].appendChild(confirm_value);
}
ファイルを持っています。私がしたのは、選択したコードをrfqcodeLBという文字列に転送することでした。そして、属性をボタンに置きます。しかしそれはヌルを示します。
誰かお手伝いできますか?ありがとう。
<asp:ImageButton ImageUrl="../Pictures/Icons/deleteblack.png" runat="server" OnClick="Unnamed_Click" ID="deleteBT" OnClientClick="return DeleteConfirm(ContentPlaceHolder1_rfqcodeLB);"/>
をしたい場合にのみ、あなたのImageButtonのIDではなく、選択した行のIDを取得します。 – VDWWD